Share
An Introduction to Green Software
This talk explores the critical role software engineers play in addressing climate change through sustainable development practices. Beginning with historical environmental successes like acid rain reduction and ozone layer protection, the presentation establishes that meaningful progress is possible when we take collective action.
The session examines the IT industry’s substantial carbon footprint, with global data centres consuming 240 to 340 terawatt hours annually (approximately 1 to 1.3% of global electricity demand), rising to around 700 terawatt hours when transmission networks are included. This places the industry’s energy consumption on a par with countries like Brazil, or the entire global aviation sector.
Students will learn practical strategies for reducing software’s environmental impact, including:
* Understanding Scope 1, 2, and 3 carbon emissions in IT contexts
* Optimising server utilisation (targeting >50%) and eliminating ‘zombie’ machines
* Implementing ‘LightSwitchOps’ for non-production environments
* Applying carbon-aware computing through demand shifting
* Leveraging measurement tools like Kepler, cloud provider dashboards and Carbon Aware SDK
* Reducing AI/ML training emissions
Charles Humble
Transcript
61 slides
-
@charleshumble.bsky.social Sulphur dioxide emissions https://ourworldindata.org/explorers/air-pollution?facet=none&uniformYAxis=0&country=GBR~USA~OWID_EUR&Pollutant=Sulphur+dioxide+ %28SO₂%29&Sector=From+all+sectors+%28Total%29&Per+capita=false 60 million t 1750
1800 1850 1900 1950 2000 2022 50 million t 40 million t 30 million t 20 million t 10 million t Europe United States United Kingdom -
@charleshumble.bsky.social https://ourworldindata.org/ozone-layer?insight=the-initial-montreal-protocol-wouldn-t-have-been-successful-in-reducing-ozone-depleting- emissions-an-increase-in-ambition-from-subsequent-agreements-has-been-essential Ozone hole Emissions of the Ozone Depleting
Substances (world) 200,000 tonnes 400,000 tonnes 600,000 tonnes 800,000 tonnes 1 million tonnes 1.2 million tonnes 1.4 million tonnes 1.6 million tonnes Methyl Chloroform Chlorofluorocarbons (CFCS) Carbon Tetrachloride Methly Bromide Hydrochloroflurocarbons (HCFCs) Haloms 1986 1990 1995 2000 2005 2010 2015 2021 -
@charleshumble.bsky.social https://www.epa.gov/climatechange-science/causes-climate-change The hockey stick 0.6 0.4 0.2 0.0 -0.0
-0.4 -0.6 -0.8 0 1 2 3 4 5 6 -1 -2 -3 -4 Temperature Anomaly (°C) Standardised PAGES2K 1000 1200 1400 1600 1800 2000 -
@charleshumble.bsky.social The cost of low carbon technology • In the
last decade, the price of solar energy has fallen by more than 90%. • The price of wind energy by more than 70%. • Battery costs have also tumbled. https://www.weforum.org/agenda/2021/10/how-cheap-can-renewable-energy-get/ -
@Charleshumble • The IEA suggests that estimated global data centre
electricity consumption in 2022 was 240-340 TWh, accounting for around 1-1.3% of all global electricity demand • That fi gure excludes data transmission networks, which more-or-less double this fi gure, adding an estimated 260-360 TWh in the same period, or another 1-1.5% of global electricity use • It also excludes the energy used for cryptocurrency mining, which was estimated to be around 110 TWh in 2022, a further 0.4% of annual global electricity demand How Much Carbon is IT Responsible For? -
@charleshumble.bsky.social What do scopes 1, 2 and 3 mean? The
Greenhouse Gas Protocol categorises GHG emissions into three “scopes”. SCOPE 1 Direct Emissions from operations owned or controlled by the reporting organiszation, such as onsite fuel combustion or fleet vehicles DIRECT EMISSIONS SCOPE 2 Indirect emmissions related to emission generation or purchased energy, such as heat and electricity. In 2015, the Corportate Standard was updated with comprehensive Scope 2 guidance INDIRECT EMISSIONS SCOPE 3 INDIRECT EMISSIONS Other indirect emissions from other activities, including all emissions from an organisation’s supply chain, business travel for employees and the electricity customers may consume when using a product -
@charleshumble.bsky.social What do scopes 1, 2 and 3 mean? The
Greenhouse Gas Protocol categorises GHG emissions into three “scopes”. SCOPE 1 Direct emissions from operations owned or controlled by the reporting organisation, such as onsite fuel combustion or fleet vehicles DIRECT EMISSIONS SCOPE 2 Indirect emissions related to emission generation or purchased energy, such as heat and electricity. In 2015, the Corporate Standard was updated with comprehensive Scope 2 guidance INDIRECT EMISSIONS SCOPE 3 INDIRECT EMISSIONS Indirect emissions from other activities, including all emissions from an organisation's supply chain, business travel for employees and the electricity customers may consume -
@charleshumble.bsky.social What do scopes 1, 2 and 3 mean? The
Greenhouse Gas Protocol categorises GHG emissions into three “scopes”. SCOPE 1 Direct emissions from operations owned or controlled by the reporting organisation, such as onsite fuel combustion or fleet vehicles DIRECT EMISSIONS SCOPE 2 Indirect emissions related to emission generation or purchased energy, such as heat and electricity. In 2015, the Corporate Standard was updated with comprehensive Scope 2 guidance INDIRECT EMISSIONS SCOPE 3 INDIRECT EMISSIONS Indirect emissions from other activities, including all emissions from an organisation's supply chain, business travel for employees and the electricity customers may consume -
@charleshumble.bsky.social What do scopes 1, 2 and 3 mean? The
Greenhouse Gas Protocol categorises GHG emissions into three “scopes”. SCOPE 1 Direct emissions from operations owned or controlled by the reporting organisation, such as onsite fuel combustion or fleet vehicles DIRECT EMISSIONS SCOPE 2 Indirect emissions related to emission generation or purchased energy, such as heat and electricity. In 2015, the Corporate Standard was updated with comprehensive Scope 2 guidance INDIRECT EMISSIONS SCOPE 3 INDIRECT EMISSIONS Indirect emissions from other activities, including all emissions from an organisation's supply chain, business travel for employees and the electricity customers may consume SCOPE 1 Direct emissions from operations owned or controlled by the reporting organisation, such as onsite fuel combustion or fleet vehicles DIRECT EMISSIONS SCOPE 2 Indirect emissions related to emission generation or purchased energy, such as heat and electricity. In 2015, the Corporate Standard was updated with comprehensive Scope 2 guidance INDIRECT EMISSIONS SCOPE 3 INDIRECT EMISSIONS Indirect emissions from other activities, including all emissions from an organisation's supply chain, business travel for employees and the electricity customers may consume -
@charleshumble.bsky.social What are carbon neutral and net zero? • To
be carbon neutral, an organisation must measure its scope 1 and 2 emissions, then match the total with emissions o ff sets through carbon reduction projects. • Net zero means reducing emissions according to the latest climate science, and balancing remaining residual emissions through carbon removals. -
@charleshumble.bsky.social More efficient platforms • Many of the major platforms
are making investments in terms of e ffi ciency—the JVM itself and modern frameworks such as Quarkus. -
@charleshumble.bsky.social More efficient platforms • Many of the major platforms
are making investments in terms of e ffi ciency—the JVM itself and modern frameworks such as Quarkus. • Python, which was languishing in our programming e ffi ciency table, is also improving. -
@charleshumble.bsky.social Why start with ops? • Energy proportionality is an
observation from Google that even an energy e ffi cient server still consumes about half its power when doing virtually no work. https://research.google/pubs/the-case-for-energy-proportional-computing/ -
@charleshumble.bsky.social Why start with ops? • Energy proportionality is an
observation from Google that even an energy e ffi cient server still consumes about half its power when doing virtually no work. • Servers designed with less attention to energy e ff i ciency often idle at even higher power levels. https://research.google/pubs/the-case-for-energy-proportional-computing/ -
@charleshumble.bsky.social How do we get more efficient? A good fi
rst goal would be to aim to have machine utilisation at >=50% at all times across your entire estate. -
@charleshumble.bsky.social Start by getting rid of zombies • Zombies are
any machines that were doing useful work but no longer are. -
@charleshumble.bsky.social Start by getting rid of zombies • Zombies are
any machines that were doing useful work but no longer are. • Get rid of them. Zombies are bad. -
@charleshumble.bsky.social LightSwitchOps • One of the best encapsulations of this
I’ve heard of comes from Red Hat’s Holly Cummins. She calls it “LightSwitchOps”. • A good place to start would be by turning o ff your test and development services in the evenings and at weekends. • If your business isn’t global you will have hours where you have peak demand and hours where you have much less demand. • So run an audit— fi nd out what your servers are doing—and get rid of anything you don’t need. If you know you can bring it back easily you can a ff ord to be brutal. -
@charleshumble.bsky.social Use autoscaling • Have a look at where you
can apply autoscaling. -
@charleshumble.bsky.social Datacenter specific wins • You have control over the
lifetime of your hardware. • You can also take advantage of the power-saving features already present in your hardware. • Consider using more e ffi cient CPUs for the hardware you purchase. • You can even look at using a lower voltage within the range supported by the hardware. -
@charleshumble.bsky.social Measurements and proxies • We often have to rely
on proxies to calculate our environmental impact. -
@charleshumble.bsky.social Measurements and proxies • We often have to rely
on proxies to calculate our environmental impact. • One of the best proxies for energy is CPU utilisation. -
@charleshumble.bsky.social Measurements and proxies • We often have to rely
on proxies to calculate our environmental impact. • One of the best proxies for energy is CPU utilisation. • Cost is a useful proxy for carbon emissions—up to a point—unlike many other industries we don’t have to pay what Bill Gates calls “the green premium”. -
@charleshumble.bsky.social Beyond proxies • The CNCF Kepler (Kubernetes E ffi
cient Power Level Exporter) project uses eBPF to probe energy-related system stats for Kubernetes workloads and exports them as Prometheus metrics https://github.com/sustainable-computing-io/kepler/ -
@charleshumble.bsky.social Beyond proxies • These can be imported via the
pre-generated Kepler Dashboard into Grafana -
@charleshumble.bsky.social Beyond proxies • If you have workloads on public
clouds, then AWS (Customer Carbon Footprint Tool), Azure (Emissions Impact Dashboard) and Google Cloud (Carbon Footprint) all have strong sustainability goals and provide tools to assess your carbon footprint on their platforms. -
@charleshumble.bsky.social Beyond proxies • If you have workloads on public
clouds, then AWS (Customer Carbon Footprint Tool), Azure (Emissions Impact Dashboard) and Google Cloud (Carbon Footprint) all have strong sustainability goals and provide tools to assess your carbon footprint on their platforms. • Cloud Carbon Footprint is an open source alternative sponsored by Thoughtworks that can measure, monitor and reduce your carbon emissions on public clouds. -
@charleshumble.bsky.social Location, location, location • Putting your workloads where the
electricity is greenest is an instant quick win. • Electricity Maps has partnered with Google, AWS and Salesforce to provide customers with real-time, global coverage of the carbon intensity of electricity. https://app.electricitymaps.com/map -
@charleshumble.bsky.social Demand shifting • There are APIs such as Electricity
Maps, WattTime and the Carbon Aware SDK from the Green Software Foundation. -
@charleshumble.bsky.social Demand shifting • There are APIs such as Electricity
Maps, WattTime and the Carbon Aware SDK from the Green Software Foundation. • Armed with these, you can apply a more advanced techniques called demand shifting or shaping—responding to shifts in carbon intensity by increasing or decreasing your demand. https://www.conissaunce.com/demand-shifting-and-shaping.html -
@charleshumble.bsky.social Demand shifting • There are APIs such as Electricity
Maps, WattTime and the Carbon Aware SDK from the Green Software Foundation. • Armed with these, you can apply a more advanced technique called demand shifting or shaping—responding to shifts in carbon intensity by increasing or decreasing your demand. • Demand shifting can also be based on location. https://www.conissaunce.com/demand-shifting-and-shaping.html -
@charleshumble.bsky.social Sidebar: AI • Although we know training and using
AI consumes a lot of energy, publicly available information on the environmental cost of AI is scant. -
@charleshumble.bsky.social Sidebar: AI • Although we know training and using
AI consumes a lot of energy, publicly available information on the environmental cost of AI is scant. • Microsoft reported in May of 2024 that its total carbon emissions have risen nearly 30% since 2020 primarily due to the construction of data centres to meet its push into AI. https://www.microsoft.com/en-us/corporate-responsibility/sustainability/report -
@charleshumble.bsky.social Sidebar: AI • Although we know training and using
AI consumes a lot of energy, publicly available information on the environmental cost of AI is scant. • Microsoft reported in May of 2024 that its total carbon emissions have risen nearly 30% since 2020 primarily due to the construction of data centres to meet its push into AI. • Google’s emissions have surged nearly 50% compared to 2019. They also increased 13% year-on-year in 2023, according to their report. The company attributed the emissions spike to an increase in data centre energy consumption and supply chain emissions driven by arti fi cial intelligence. https://www.gstatic.com/gumdrop/sustainability/google-2024-environmental-report.pdf -
@charleshumble.bsky.social Make sound choices • For any work that isn’t
particularly latency sensitive, such as training a machine learning (ML) model, it’s smart to do it in a region with lower carbon intensity when you have access to the greenest power. -
@charleshumble.bsky.social Make sound choices • For any work that isn’t
particularly latency sensitive, such as training a machine learning (ML) model, it’s smart to do it in a region with lower carbon intensity when you have access to the greenest power. • Researchers from University College Dublin have found that practicing time-shifting methodologies for ML models can reduce software- related carbon emissions between 45% and 99% https://ieeexplore.ieee.org/document/6128960 -
@charleshumble.bsky.social Make sound choices • For any work that isn’t
particularly latency sensitive, such as training a machine learning (ML) model, it’s smart to do it in a region with lower carbon intensity when you have access to the greenest power. • Researchers from University College Dublin have found that practicing time-shifting methodologies for ML models can reduce software- related carbon emissions between 45% and 99%. • Consider whether a pre-trained model would work, and also factor the carbon costs into your calculations. https://ieeexplore.ieee.org/document/6128960 -
@charleshumble.bsky.social Make sound choices • For any work that isn’t
particularly latency sensitive, such as training a machine learning (ML) model, it’s smart to do it in a region with lower carbon intensity when you have access to the greenest power. • Researchers from University College Dublin have found that practicing time-shifting methodologies for ML models can reduce software- related carbon emissions between 45% and 99%. • Consider whether a pre-trained model would work, and also factor the carbon costs into your calculations. • Keep in mind that training is only part of the cost. https://ieeexplore.ieee.org/document/6128960 -
@Charleshumble Size Matters • By shrinking the model size, it
is possible to speed up training time as well as increase the resource e ffi ciency of training • Shrinking the model sizes is an ongoing research area, with several initiatives exploring topics like pruning, distillation, and quantization as means of compression • All three can be applied during training to speed up the training process, or post training to reduce inferencing costs • Speculative decoding, which works in a similar manner to branch prediction in modern pipelined CPUs, can be applied post training to reduce cost/inference -
@charleshumble.bsky.social Summary If you are looking to start improving your
software sustainability think operations fi rst, not code. -
@charleshumble.bsky.social Summary If you are looking to start improving your
software sustainability think operations fi rst, not code. Aim to reach >=50% utilisation for servers across your estate. -
@charleshumble.bsky.social Summary • Apply LightSwitchOps, turn o ff under-utilised machines
(zombies) and do manual rightsizing • Use autoscaling where possible (including scaling down!) • Run more applications on the same hardware (multi-tenancy). • Use more e ffi cient CPUs that are matched with your workload requirements. • Look at where your workloads run from an environmental perspective using Electricity Maps and apply demand shifting. -
@Charleshumble For Cloud workloads • Use the smallest hardware con
fi guration that can safely execute the job • Run compute in areas where low carbon electricity is abundant and where there are credible plans to make the grid even cleaner • Use cloud services from cloud providers that have data centres in green locations and provide good tooling to help reduce your footprint • Optimise the execution time of jobs to further reduce the footprint