The 10 best tools to green your software

Looking for ways to code in a more sustainable way? We’ve got you covered with our top list of tools to help lower your carbon footprint.

| 7 minutes

This July, the world experienced the hottest day in recorded history according to NASA. The graph below, from a GitHub repository of open access climate visuals, shows the longer version of this story, where carbon dioxide and other greenhouse gasses have increased since the beginning of the industrial revolution. The effects of which we’re starting to see more and more—from severe weather events to hitting all-time highs—like the hottest day in history. These serve as reminders to all of us for the need to take action, particularly for those of us working in tech. As the energy use of our industry grows, we believe that we have a responsibility to help support sustainable practices so that we can reduce the environmental impact of the software we build.

Graph showing changes emerging across the climate system over the last 2,000 years, as well as significant changes that have happened since 1850.

So, how do we accelerate climate progress without inhibiting innovation? Well, that’s the conversation we want to open up within our developer community. And to start, we went directly to those who are already making progress to develop green software tools within the open source ecosystem. After reviewing repositories on GitHub that self-identified as being a green software tool as their primary purpose, we compiled these into a directory of resources built by our community, for our community. We ended up with GitHub’s Green Software Directory that includes a comprehensive list of the green software tools out there. Below, we picked some of the most-loved repositories within the community—those with 250+ stars—to help you code sustainably, whether you’re just starting out or you’re a seasoned professional.

TL;DR: What is green software?

Green software is software that emits the least carbon possible. There are three ways to reduce the carbon emissions of software: through energy efficiency, carbon awareness, and hardware efficiency. Energy efficiency means your software is consuming the least amount of electricity possible. Hardware efficiency is using the least amount of embodied carbon as possible. And carbon awareness means adjusting your workflow so that you’re doing more when you’re using clean electricity, and doing less when it’s dirty.

Diagram showing the three green software principles: energy efficiency, hardware efficiency, and carbon awareness.

Our top 10 tools

1. Scaphandre

⭐: 1,500+

Scaphandre [skafɑ̃dʁ] is a metrology agent dedicated to electric power and energy consumption metrics. Use it to measure the power consumption of your tech services and get this data in a convenient form, sending it through any monitoring or data analysis toolchain.

An example dashboard built by Scaphandre that details power consumption and the top consumers.

2. Kepler

⭐: 1,100+

Kepler (Kubernetes-based Efficient Power Level Exporter) uses eBPF to probe performance counters and other system stats, uses ML models to estimate workload energy consumption based on these stats, and then exports them as Prometheus metrics. Use it to learn about energy consumption of Kubernetes components such as Pods and Nodes.

Diagram of the Kepler Exporter architecture, which exposes a variety of metrics about the energy consumption of Kubernetes components such as Pods and Nodes.

3. Code Carbon

⭐: 1,100+

A Python package that estimates your hardware electricity power consumption (GPU + CPU + RAM) and then applies to it the carbon intensity of the region where the computing is done.

Bonus: check out mlco2’s other repository, Impact, to calculate machine learning emissions.

Equation showing that the sum of your hardware energy consumption is made up of GPU, CPU and RAM, which is then multiplied by your regional carbon intensity of electricity.

4. Kube Green

⭐: 972+

A simple k8s add-on that automatically shuts down some of your resources when you don’t need them.

Graph showing increasing CPU usage, that then is turned off by Kube Green when it’s no longer in use.

5. Cloud Carbon Footprint

⭐: 882+

A tool to estimate energy use (kilowatt-hours) and carbon emissions (metric tons CO2e) from public cloud usage.

Graphs showing examples of someone’s cloud carbon footprint.

6. Carbon Aware SDK

⭐: 456+

A toolset to help you measure the carbon emissions of your software, in turn helping you measure and reduce your software’s carbon emissions, and choose when and where you run your software to make it greener.

Example graph that measures carbon intensity against a timeline, showing that it’s best to run software more during times when your energy is greener and the carbon intensity is lower.

Bonus: check out the Green Software Foundation’s other repository, Impact Framework, which is a framework to model, measure, simulate, and monitor the environmental impacts of software.

7. CO2.js

⭐: 388+

An open source JavaScript library that enables you to estimate the carbon emissions produced by transferring bytes of data on the internet, get different forms of grid intensity data, such as annual average and marginal data by country, and make automated queries against Green Web Foundation’s Green Domain’s dataset.

Introduction text in CO2.js’ README from their repository.

Bonus: check out The Green Web Foundation’s other repositories, grid-intensity-go, which helps you factor carbon intensity into decisions about where and when to run jobs, the Green Cost Explorer, which will show you your climate-related spend analysis for AWS, and carbon.txt, which allows digital service providers to demonstrate that their digital infrastructure runs on green electricity.

8. carbontracker

⭐: 356+

Track and predict your energy consumption and carbon footprint of training deep learning models.

Introduction text in carbontracker’s README from their repository.

9. Kernel Tuner

⭐: 269+

Create optimized GPU applications in any mainstream GPU programming language (CUDA, HIP, OpenCL, OpenACC).

Overview of Kernel Tuner’s ecosystem including Kernal Launcher, Kernel Float, and Kernal Dashboard.

10. experiment-impact-tracker

⭐: 266+

A simple drop-in method to track energy usage, carbon emissions, and compute utilization of your system.

Introduction text in experiment-impact-tracker’s README from their repository.

Bonus tools (that you shouldn’t miss out on)

We found a couple other great measurement tools from Green Coding Solutions that you should check out: Eco-CI, a project aimed at estimating energy consumption in continuous integration (CI) environments, and Green Metrics Tool, which measures the energy and CO2 consumption of software through a software life cycle analysis (SLCA).

Do you know of a green software repository that we missed? Let us know! This list is meant to grow and develop, so we welcome any suggestions from our community on how we can improve it. And don’t forget, this is just the beginning of the conversation, so stay tuned as we continue to share knowledge from our community and develop new resources to help you code more sustainably!

Related posts

Software as a public good

Open source software underpins all sectors of the economy, public services and even international organizations like the United Nations. How can all its beneficiaries work together to make the open source ecosystem more sustainable?