Skip to content

Commit 1dd801c

Browse files
authored
Document carbon accounting approaches (#106)
* Create carbon folder * Add grid carbon intensity and embodied carbon * Add network carbon intensity
1 parent e051537 commit 1dd801c

File tree

10 files changed

+162
-29
lines changed

10 files changed

+162
-29
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ The main theme is referenced as node_module and thus updating is handled via npm
1313
Following files have been overloaded and should be checked if they are changed on an update:
1414

1515
- `assets/js/flexsearch.js` (commented out one line due to an Firefox-related issue)
16-
- `/layouts/_default/single.html` (enable display of the `lead` attribute)
1716
- `/layouts/partials/*` (Removed integrity protection to run on Cloudflare CDN)
1817
- `/layouts/index.headers` (Removed CSP netlify)
1918

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: "Carbon Accounting"
3+
description: "How to account the carbon emissions by IT workloads"
4+
date: 2025-07-18T08:49:15+00:00
5+
weight: 2
6+
sidebar:
7+
collapsed: true
8+
---
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
title: "Embodied Carbon"
3+
description: "How to account for carbon emissions caused by the manufacturing of IT devices"
4+
date: 2025-07-18T08:49:15+00:00
5+
weight: 540
6+
toc: true
7+
---
8+
9+
Embodied carbon refers to the greenhouse gas emissions generated throughout the entire lifecycle of IT hardware — from raw material extraction and manufacturing through transportation and disposal — as opposed to operational carbon from running the device. For many IT devices like smartphones, laptops, etc., embodied carbon represents 50-80% of total lifecycle emissions.
10+
11+
## Data Sources
12+
13+
Embodied carbon data comes from Life Cycle Assessment (LCA) studies that analyze the complete environmental impact of devices from cradle to grave. These studies quantify emissions from:
14+
15+
- Raw material extraction
16+
- Manufacturing processes
17+
- Transportation
18+
- End-of-life disposal
19+
20+
You can get data from available databases or directly from the manufacturer.
21+
22+
Example sources:
23+
24+
- Databases:
25+
- [Boavizta Database](https://dataviz.boavizta.org/serversimpact) - Open database for IT emissions
26+
- [Resilio Database](https://resilio-solutions.com/en/services/database) - Commercial LCA database
27+
- Manufacturer Data:
28+
- [Microsoft Surface TCO Calculator](https://tco.exploresurface.microsoft.com/sustainability/calculator)
29+
- [Dell R740 LCA Report](https://www.delltechnologies.com/asset/en-us/products/servers/technical-support/Full_LCA_Dell_R740.pdf)
30+
31+
See also Green Software Foundation's webpage [Datasets](https://sci-guide.greensoftware.foundation/M/Datasets).
32+
33+
## Relevance for the Green Metrics Tool
34+
35+
Embodied carbon is a key component of the [Software Carbon Intensity (SCI)]({{< relref "sci" >}}) metric. The Green Metrics Tool incorporates embodied carbon to provide a complete picture of software's environmental impact by:
36+
37+
- **Proportional allocation**: Calculating how much embodied carbon should be attributed to each measurement run based on its duration and the device's expected lifetime
38+
- **Hardware accountability**: Ensuring that the environmental cost of hardware is fairly distributed across all software running on it
39+
- **Complete carbon accounting**: Adding embodied carbon to operational carbon to reflect the true environmental impact of software execution
40+
- **Comparative analysis**: Enabling fair comparison between different software implementations by including the full lifecycle impact of the hardware they run on
41+
42+
The tool displays embodied carbon emissions for every measurement run, making it visible how hardware choices affect the overall carbon footprint of software.
43+
44+
### Configuration
45+
46+
You can configure the embodied carbon parameters as part of the [SCI]({{< relref "sci" >}}) configuration in `config.yml`:
47+
48+
```yml
49+
sci:
50+
EL: 4 # Expected device lifetime in years
51+
RS: 1 # Resource Share (1 = 100% of machine, 0.5 = 50% virtualized)
52+
TE: 181000 # Total Embodied emissions in grams CO2e
53+
```
54+
55+
GMT calculates the embodied carbon per measurement as:
56+
57+
```plain
58+
(TE / EL) × (measurement_duration / year_duration) × RS
59+
```
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
title: "Grid Carbon Intensity"
3+
description: "How to account for carbon emissions caused by grid-supplied power"
4+
date: 2025-07-18T08:49:15+00:00
5+
weight: 520
6+
toc: true
7+
---
8+
9+
Grid carbon intensity refers to the amount of carbon dioxide equivalent (CO₂e) emissions produced per kilowatt-hour (kWh) of electricity consumed from the power grid. This metric reflects the mix of energy sources (coal, gas, renewables, nuclear) used to generate electricity in a specific location and time.
10+
11+
We have described the conversion from energy to carbon emissions also on our website: [CO₂ Formulas - From kWh to CO₂e](https://www.green-coding.io/co2-formulas/#from-kwh-to-co2e)
12+
13+
## Data Sources
14+
15+
Grid carbon intensity data is available from government agencies, energy databases, and specialized services that track regional electricity carbon intensities.
16+
17+
Examples of available databases and services can be found on the Green Software Foundation's webpage (Grid Carbon Intensity: https://sci-guide.greensoftware.foundation/I/) and on the Green Software Landscape (https://landscape.bundesverband-green-software.de/?group=measurement&view-mode=grid&category=Databases) by the Bundesverband Green Software.
18+
19+
## Relevance for the Green Metrics Tool
20+
21+
Grid carbon intensity is the **I** parameter in the [Software Carbon Intensity (SCI)]({{< relref "sci" >}}) metric. The Green Metrics Tool uses grid carbon intensity to transform the measured energy consumption into carbon emissions based on local grid characteristics.
22+
23+
### Configuration
24+
25+
You can configure the grid carbon intensity as part of the [SCI]({{< relref "sci" >}}) configuration in `config.yml`:
26+
27+
```yml
28+
sci:
29+
I: 334 # Grid carbon intensity in gCO2e/kWh (example value for Germany 2024)
30+
```
31+
32+
GMT calculates the operational carbon emissions by multiplying measured energy consumption by the grid carbon intensity value.
33+
34+
### Static vs Dynamic Values
35+
36+
The Green Metrics Tool uses **static** grid carbon intensity values rather than dynamic real-time data. This design choice ensures **reproducible measurements** (results remain consistent across different measurement times) and **fair comparisons** (measurements on the same machine with the same configuration use the same baseline for carbon intensity).
37+
38+
You should set the grid carbon intensity to represent the typical or average value for your location.
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
title: "Network Carbon Intensity"
3+
description: "How to estimate the carbon emissions of network transfer"
4+
date: 2025-07-18T08:49:15+00:00
5+
weight: 530
6+
toc: true
7+
---
8+
9+
Network carbon intensity measures the amount of carbon dioxide equivalent (CO₂e) emissions generated per unit of data transferred across network infrastructure.
10+
Since carbon emissions from network transfers cannot be directly measured, they must be estimated. Network carbon intensity is calculated using two factors:
11+
12+
- Network Energy Intensity (kWh/GB)
13+
- [Grid Carbon Intensity]({{< relref "grid-carbon-intensity" >}}) (g CO₂e/kWh).
14+
15+
## Methodology
16+
17+
The network carbon intensity methodology and data sources used by the Green Metrics Tool are documented in detail on our [CO₂ Formulas page](https://www.green-coding.io/CO2-formulas/#gigabytes-to-kwh).
18+
19+
## Relevance for the Green Metrics Tool
20+
21+
The Green Metrics Tool aims to provide not just the energy consumption of the device, but also an estimated value for the carbon emissions resulting from network data transfer. To achieve this, it uses the network carbon intensity approach.
22+
23+
Although network emissions are not officially part of the [Software Carbon Intensity (SCI)]({{< relref "sci" >}}) specification, the Green Metrics Tool includes them to offer a more complete view of your software’s carbon footprint.
24+
25+
### Measurement Approach
26+
27+
The Green Metrics Tool aggregates all network traffic from all containers and estimate CO₂ emissions using the [CO₂-Formula](https://www.green-coding.io/CO2-formulas). This approach assumes that all traffic is with external services. However, if your containers only communicate with each other and run on a single machine in production, the calculated emissions will significantly overstate the actual CO₂ impact.
28+
29+
We made this design choice because, during benchmarking, we can't predict how your containers will be orchestrated in production. They might all run on one machine (resulting in zero network emissions), be distributed within a data center (with minimal emissions), or be spread globally (incurring the highest emissions). Since the Green Metrics Tool is meant to provide a baseline for optimization, we chose to report based on the worst-case scenario.
30+
31+
### Configuration
32+
33+
You can configure the network energy intensity as part of the [SCI]({{< relref "sci" >}}) configuration in `config.yml`:
34+
35+
```yml
36+
sci:
37+
N: 0.001875 # unit: kWh/GB
38+
```
39+
40+
GMT calculates the network carbon intensity as:
41+
42+
```plain
43+
network_data_transfer × N × I
44+
```
45+
46+
The factor *I* is described in [Grid Carbon Intensity]({{< relref "grid-carbon-intensity" >}}).

content/en/docs/measuring/sci.md renamed to content/en/docs/measuring/carbon/sci.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
2-
title: "SCI (Green Software Foundation)"
2+
title: "Software Carbon Intensity (SCI)"
33
description: "How to measure the Green Software Foundation's SCI metric with the Green Metrics Tool"
44
date: 2023-08-04T08:49:15+00:00
5-
weight: 442
5+
weight: 550
66
toc: true
77
---
88

@@ -53,18 +53,15 @@ If you have an API or similar the output might not happen on the CLI directly, b
5353
5454
An [example configuration](https://github.com/green-coding-solutions/green-metrics-tool/blob/main/config.yml.example) for the `config.yml` is provided when the Green Metrics Tool is installed.
5555
The values for the respective variables have to be either defined to best knowledge (like lifetime for instance) and / or
56-
from official databases like:
57-
- [https://dataviz.boavizta.org/manufacturerdata](https://dataviz.boavizta.org/manufacturerdata)
58-
- [https://tco.exploresurface.com/sustainability/calculator](https://tco.exploresurface.com/sustainability/calculator)
59-
- [https://www.delltechnologies.com/asset/en-us/products/servers/technical-support/Full_LCA_Dell_R740.pdf](https://www.delltechnologies.com/asset/en-us/products/servers/technical-support/Full_LCA_Dell_R740.pdf)
56+
from official databases (like [Embodied Carbon →]({{< relref "embodied-carbon" >}}) and [Grid Carbon Intensity →]({{< relref "grid-carbon-intensity" >}})). See the respective documentation page for possible sources.
6057

6158
Example:
6259
```yml
6360
sci:
6461
EL: 4 # means 4 years of usage
6562
RS: 1 # means we use 1/1 = 100% of the machine. Bare metal. No virtualization
6663
TE: 181000 # Example value for a laptop taken from https://dataviz.boavizta.org/terminalimpact. Value is in g
67-
I: 436 # The number 436 that comes as default is for Germany from 2022. Value in gCO2e/kWh
64+
I: 334 # The number 334 that comes as default is for Germany from 2024. Value in gCO2e/kWh
6865
```
6966

7067
## Display
@@ -84,7 +81,7 @@ The [SCI formula](https://sci-guide.greensoftware.foundation/) is specified by t
8481
The components of the SCI are attributed by the GMT as follows:
8582

8683
- *E*: The energy of the total machine + the energy of the network.
87-
- A *PSU Energy* provider must be activated to populate this value with the machine energy like [PSU Energy XGBoost]({{< relref "metric-providers/psu-energy-xgboost-machine" >}}), [PSU Energy MCP]({{< relref "metric-providers/psu-energy-ac-mcp-machine" >}}) etc.
84+
- A *PSU Energy* provider must be activated to populate this value with the machine energy like [PSU Energy XGBoost]({{< relref "../metric-providers/psu-energy-xgboost-machine" >}}), [PSU Energy MCP]({{< relref "../metric-providers/psu-energy-ac-mcp-machine" >}}), etc.
8885
- If none is activated machine energy will be excluded from the SCI.
8986
- A *Network IO* provider must be activated to populate this value with the network energy.
9087
- If none is activated network energy will be excluded from the SCI.

content/en/docs/measuring/configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ optimization:
168168
169169
## sci
170170
171-
Please see for details: [SCI →]({{< relref "sci" >}}).
171+
Please see for details: [SCI →]({{< relref "carbon/sci" >}}).
172172
173173
## electricity_maps_token
174174

content/en/docs/measuring/metric-providers/cpu-utilization-cgroup-system-provider.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
title: "CPU % - cgroup - sytem"
33
description: "Documentation for CpuUtilizationCgroupSystemProvider of the Green Metrics Tool"
4-
lead: ""
54
date: 2025-01-15T08:49:15+00:00
65
draft: false
76
images: []

content/en/docs/measuring/metric-providers/network-io-cgroup-container.md

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -58,25 +58,12 @@ After having entered the namespace the provider reads from `/proc/net/dev` and:
5858
- sums up the `r_bytes` and `t_bytes` of all other interfaces
5959
- does NOT count dropped packets (we assume since most of the traffic is internal, that a dropped received packet shows up in another interface as sent anyway and a dropped sent packet does not attribute much to the energy consumption).
6060

61-
#### Attribution of network traffic
61+
### Attribution of network traffic
6262

6363
Currently all incoming and outgoing traffic is attributed to every container that sends or receives it.
6464

6565
This may lead to unexpected results when you process the results, but is a design decision.
6666

67-
In our [Green Metrics Dashboard](https://metrics.green-coding.io) we simply accumulate all the network traffic of all containers and then
68-
apply the [CO2-Formula](https://www.green-coding.io/co2-formulas) on top.
69-
70-
This however assumes that all traffic is with external services. If your containers are however only
71-
communicating with each other and are in production all on one machine, this number will not
72-
represent the real CO2 emissions, but is rather greatly overstating them.
73-
74-
This design decision was made cause we cannot know during benchmarking how your containers
75-
would be orchestrated in production.
76-
They can very well be all on one machine (which would have zero network emissions), but they also could be distributed in an internal network
77-
of a datacenter (which would have only marginal network CO2 emissions) or really distributed globally (which would then have the maximum of CO2 emissions).
78-
79-
Since our reporters should give you an optimization baseline we opted for the worst-case scenario to report in our Dashboard.
80-
81-
When processing the metrics you own you may well use a different approach given your knowledge of the network topology.
67+
In our [Green Metrics Dashboard](https://metrics.green-coding.io) we simply accumulate all the network traffic of all containers and calculate CO2 emissions by applying the [CO2-Formula](https://www.green-coding.io/co2-formulas) on top.
8268

69+
The page [Network Carbon Intensity →]({{< relref "../carbon/network-carbon-intensity" >}}) provides more information and discusses the advantages and disadvantages of this approach.

content/en/docs/measuring/usage-scenario.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ services:
145145
+ Make sure to also set `log-stdout` to `true`. Format specification is documented below in section [Read-notes-stdout format specification →]({{< relref "#read-notes-stdout-format-specification" >}}).
146146
- `read-sci-stdout:` **[bool]** *(optional)*
147147
+ Enables the reading of ticks for the unit of work (*R*) required to calculate the SCI metric.
148-
+ Please see [SCI (Green Software Foundation) →]({{< relref "sci" >}}) for more information.
148+
+ Please see [Software Carbon Intensity (SCI) →]({{< relref "carbon/sci" >}}) for more information.
149149
- `docker-run-args:` **[list]** *(optional)*
150150
+ A list of string that should be added to the `docker run` command of that container.
151151
+ The argument needs to be listed in the `user.capabilities` json under `measurement:orchestrators:docker:allow-args`. The string in the `user.capabilities` can be a regex. Opening this up could be a potential security issue!
@@ -221,7 +221,7 @@ flow:
221221
+ Make sure to also set `log-stdout` to `true`. Format specification is documented below in section [Read-notes-stdout format specification →]({{< relref "#read-notes-stdout-format-specification" >}}).
222222
- `read-sci-stdout:` **[bool]** *(optional)*
223223
+ Enables the reading of ticks for the unit of work (*R*) required to calculate the SCI metric.
224-
+ Please see [SCI (Green Software Foundation) →]({{< relref "sci" >}}) for more information.
224+
+ Please see [Software Carbon Intensity (SCI) →]({{< relref "carbon/sci" >}}) for more information.
225225

226226
### compose-file:
227227

0 commit comments

Comments
 (0)