Skip to content

Latest commit

 

History

History
219 lines (172 loc) · 9.58 KB

CARBON.md

File metadata and controls

219 lines (172 loc) · 9.58 KB

Carbon footprint of an alt-text generation

Altbot reports, alongside each generated alt-text, how much electricity the generation used and how much CO2e it emitted.

The second figure comes from an independent review of Altbot's footprint. The methodology and the reference values below are the work of Vincent Bernstein (climate strategy and digital sustainability consultant), who reviewed Altbot's energy reporting and extended it to a full carbon footprint. His calculations are published under CC-BY-SA 4.0.

This document explains what the numbers mean, where the data comes from, and how to parameterise them for your own instance.

What is counted

The footprint has two parts.

Operational emissions are the emissions of the electricity consumed while the hardware runs. The electricity number Altbot historically displayed only covered the GPU, so it missed two things:

  • the rest of the server (CPU, RAM, storage, PSUs, fans, motherboard), and
  • the overhead of the data centre itself, expressed as the PUE (Power Usage Effectiveness): for every watt drawn by the server, the facility draws PUE - 1 extra watts for cooling, lighting, power distribution losses, and so on.

Embodied emissions are the emissions of manufacturing the hardware, spread over the time that hardware is in service. A GPU does not emit only when it computes: building it emitted carbon, and the only honest way to attribute it is to divide it by the lifetime of the part, then by the share of that part the workload uses.

The formula

For a generation that kept the hardware busy for t milliseconds:

P_facility = (P_gpu + P_other) × PUE                      [W]
E          = P_facility × t / 3 600 000                   [Wh]
CO2e_oper  = E / 1000 × I_grid                            [gCO2e]
CO2e_emb   = C_embodied_per_second × t / 1000             [gCO2e]
CO2e_total = CO2e_oper + CO2e_emb                         [gCO2e]

where:

Symbol Meaning Config key
P_gpu GPU draw during generation gpu_watts
P_other Allocated draw of the rest of the server non_gpu_watts
PUE Power Usage Effectiveness of the data centre pue
I_grid Carbon intensity of the grid, in gCO2e/kWh grid_carbon_intensity
C_embodied_per_second Manufacturing footprint amortised over usage embodied_carbon_gco2e_per_second

E is what Altbot displays as Energy used. Note that it is now a facility-level figure, PUE included, so it is roughly 1.35× larger than the GPU-only figure displayed by earlier versions. If you compare against old logs, that is why.

The reference values

The review produced these figures for the Altbot host: a Dell PowerEdge R740xd with 2× Intel Xeon Gold 6140, 128 GB of RAM, an NVIDIA RTX A5500, 2× 960 GB SAS SSD, 2× 120 GB SATA SSD, 6× 2 TB SAS HDD, and 2× 750 W PSUs, colocated in Illinois, United States.

Power

Item Value Source
GPU draw during generation 200 W measured
Allocated rest of the server 3.4355 W derived, see below
PUE 1.35 North American average, 2026
Facility draw 274.6 W (200 + 3.4355) × 1.35

That is 37 % more than the 200 W of the GPU alone, which is what previous versions of Altbot reported.

The 3.4355 W of non-GPU draw comes from allocating the server's own consumption the way the hardware is shared. The GPU is dedicated to Altbot, so the whole GPU draw is charged to it. Everything else is allocated by usage, and the basis follows the resource rather than being one uniform number:

Resource Allocated Basis
GPU 100 % dedicated to the bot
CPU 1/72 vCPU (1.39 %) share of the vCPUs
RAM 0.5 GB of 128 GB (0.39 %) measured usage during generation
SSD 30 GB of 2 160 GB (1.39 %) 1/72 of the storage
Rest of the equipment 1/72 (1.39 %) share of the vCPUs

RAM is the exception: it is allocated on measured usage rather than on the CPU share. Altbot uses about 0.5 GB while generating, which is 0.39 % of the 128 GB installed, four times less than a 1/72 share would charge. The effect on the total is invisible, since RAM is 0.01 % of the footprint either way, but it is the correct basis: the bot does not reserve a slice of memory in proportion to its CPU share.

For the Altbot host this comes out at 3.4355 W. On a busier or larger machine, or one where the bot has less of the hardware to itself, it will be higher.

Electricity

Item Value Source
Server location Illinois, United States
Grid carbon intensity 247 gCO2e/kWh Ember, 2025

The grid mix of the territory the server is plugged into is used, not the contractual supply of the operator. This is the approach recommended by the French environmental agency (ADEME): the electrons that actually reach the data centre are the ones produced by the local mix.

Hardware

Embodied carbon figures come from Boavizta for RAM, CPU, SSD, and other server equipment, and from Hubblo for the GPU.

Component Manufacturing footprint Lifetime Allocated mgCO2e/s
GPU (A5500, 24 GB) 144 kgCO2e 9 years at 1.75 % duty cycle 100 % 28.97
RAM (4× 32 GB) 0.83 kgCO2e 11 years 0.5 GB 0.0024
CPU (2× Xeon Gold 6140) 0.79 kgCO2e 11 years 1 vCPU of 72 0.0023
SSD (4 drives, 2 160 GB) 1.64 kgCO2e 11 years 30 GB 0.0047
Other server equipment 368.1 kgCO2e 11 years 1/72 0.0147

The GPU lifetime is not a wall-clock lifetime: at a 1.75 % duty cycle, a GPU rated for 9 years of operation lasts far longer in calendar time. The allocation above uses 9 years of active time, which is the conservative reading.

Total

Contribution mgCO2e/s Share
GPU manufacturing 28.97 60.5 %
Electricity 18.86 39.4 %
RAM, CPU, SSD, other 0.024 0.05 %
Total 47.86 100 %

So roughly 48 mgCO2e per second of GPU time, of which 29 mg is hardware and 19 mg is electricity. Everything that is not the GPU or the electricity is negligible for this allocation.

Note the unit: 48 mgCO2e is 0.048 gCO2e, forty-eight thousandths of a gram of CO2e. It is written in milligrams because the number is much easier to read that way, not because it is a different quantity. carbon_test.go (TestMatchesReviewedSheet, TestUnitsAreGramsNotMilligrams) pins every per-second figure above against the reviewed spreadsheet, including that conversion.

Which yields, for the configuration above:

[power_metrics]
enabled = true
gpu_watts = 200
non_gpu_watts = 3.4355
pue = 1.35
grid_carbon_intensity = 247
embodied_carbon_gco2e_per_second = 0.0290

A 30-second generation then reports about 2.29 Wh and 1.44 gCO2e.

Parameterising your own instance

The defaults shipped in example.config.toml deliberately leave the carbon values at 0: they are specific to a machine, a grid, and an allocation, and shipping someone else's numbers would be worse than shipping none.

To turn the carbon footprint on:

  1. grid_carbon_intensity — look up the carbon intensity of the grid where the server physically is, in gCO2e/kWh. State-level for the US (eGRID), country-level elsewhere. Do not use the figure from a renewable energy contract: the local mix is what the data centre actually draws on.
  2. pue — ask your data centre or hosting provider. If they do not know, the North American average is around 1.35. The European Union average was 1.36 in 2024, per the European Commission's latest report, so do not assume Europe is better. A PUE below 1 is not physical and is ignored.
  3. non_gpu_watts — the share of the rest of the machine that belongs to the bot. If the bot owns the whole machine, measure the server draw and subtract the GPU draw. If it shares the machine, allocate by the fraction of a shared resource the bot uses, as done above.
  4. embodied_carbon_gco2e_per_second — the manufacturing footprint of the allocated hardware, in gCO2e, divided by its lifetime in seconds. Use Boavizta or Hubblo for the per-component figures.

Leaving grid_carbon_intensity at 0 disables the carbon line but keeps the energy line; Altbot will not display a carbon total it cannot justify.

Limitations

  • The numbers are estimates built on generic component figures, not on a teardown of the specific parts. Expect them to be right to an order of magnitude, not to three significant digits.
  • The PUE is an average for a class of data centres. Real PUE varies with the season, the load, and the cooling design.
  • Grid intensity varies by the hour. A yearly average is used, not the marginal emissions of the moment the request was served.
  • The embodied carbon of the network, of the client device, and of the training of the model are out of scope. So is the storage of the generated text.
  • The allocation assumes the GPU is used by the bot and by nothing else. If it is shared, the GPU share should be reduced accordingly.

Credits

Methodology, reference values, and the original spreadsheet: Vincent Bernstein (vincent.bernstein.me, @vincent@floss.social), licensed CC-BY-SA 4.0.

Component data: Boavizta, Hubblo. Grid data: Ember. Methodological reference: ADEME.