惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
美团技术团队
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
月光博客
月光博客
J
Java Code Geeks
Jina AI
Jina AI
罗磊的独立博客
宝玉的分享
宝玉的分享
S
SegmentFault 最新的问题
D
DataBreaches.Net
博客园 - 叶小钗
腾讯CDC
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Last Week in AI
Last Week in AI
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Google DeepMind News
Google DeepMind News
阮一峰的网络日志
阮一峰的网络日志
B
Blog
V
Visual Studio Blog
雷峰网
雷峰网
博客园 - 【当耐特】
Apple Machine Learning Research
Apple Machine Learning Research
Engineering at Meta
Engineering at Meta
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报

The latest on open source's social impact - The GitHub Blog

GitHub and UNDP team up to advance development priorities in Ghana with open source Using AI to map hope for refugees with UNHCR, the UN Refugee Agency From private to public: How a United Nations organization open sourced its tech in four steps Scaling for impact: How GitHub Copilot supercharges smallholder farmers Our pledge to help improve the accessibility of open source software at scale How to take climate action with your code Community managers in action: Leading a developer community for good 4 steps to building a natural language search tool Software as a public good Automating open source: How Ersilia distributes AI models to advance global health equity
The 10 best tools to green your software
Paull Young · 2024-09-19 · via The latest on open source's social impact - The GitHub Blog

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.

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.

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!

Written by

Paull Young

Related posts

Explore more from GitHub

Docs

Docs

Everything you need to master GitHub, all in one place.

Go to Docs

GitHub

GitHub

Build what’s next on GitHub, the place for anyone from anywhere to build anything.

Start building

Customer stories

Customer stories

Meet the companies and engineering teams that build with GitHub.

Learn more

GitHub Universe 2024

GitHub Universe 2024

Get tickets to the 10th anniversary of our global developer event on AI, DevEx, and security.

Get tickets