Repositories for energy-saving software

Going Green

Article from Issue 270/2023
Author(s):

A number of open source projects offer tools for analyzing energy usage in software.

Word is starting to get out: Software often unnecessarily wastes a huge amount of energy. Several open source projects are developing tools for studying and measuring exactly how much. This article tours some of the most promising tools.

Taking a Tour

The Green Software Foundation (GSF) [1], which the Linux Foundation launched in 2022, has the stated mission to "Build a trusted ecosystem of people, standards, tooling, and best practices for creating and building green software." For this purpose, the GSF, which includes companies such as Microsoft, Intel, and Accenture, is organized into working groups. There are already several repositories with software, tools, and documents available on https://github.com/Green-Software-Foundation.

For example, the Open Source Working Group (opensource-wg) maintains a repository called Awesome Green Software [2] with links to a whole host of tools and research articles on energy conservation, as well as links to useful free software. On top of this, you will find an overview of climate organizations, as well as access to free articles, papers, and books.

The GSF also highlights software for the cloud and machine learning. For example, there is a link to the Green Cost Explorer [3], a JavaScript tool that docks onto Amazon's AWS Cost Explorer, but it also takes into account the energy types of the AWS regions as well as the costs. It ultimately shows you how much renewable (Green) and fossil (Grey) energy your cloud application requires.

Kepler [4], the Kubernetes Efficient Power Level Exporter, relies on eBPF to extract power-related statistics from Kubernetes. The Experiment Impact Tracker [5] and the CarbonTracker [6] measure the expected energy overhead for machine and deep learning jobs. The GitHub repository also has operating system-specific tools. For example, the Linux entry takes you to PowerAPI [7] and PowerTOP [8].

Green Patterns

Anyone who is looking to make their own IT landscape greener will find what they are looking for in the Green Software Patterns repository [9]. The GSF Patterns project collects tips and best practices for different fields of IT (AI, cloud, web) [10]. The spectrum ranges from very generic tips (e.g., run cloud jobs geographically as close to the user as possible) to concrete recommendations for action (e.g., compress transferred data). The patterns reference the Software Carbon Intensity (SCI [11]) specification software and use simple formulas to show how admins and developers computationally implement the recommendations.

The specification helps to attach an SCI score to an application based on its CO2 emissions. The lower the value, the less climate-damaging gas the software causes. The SCI score maps CO2 emissions C per unit R, where a unit can be an API call, an additional user, or an ML training run. So the rough formula is SCI=C/R, where C can be further subdivided into more specific sources, such as O (operational emissions) and M (embodied emissions). O is the energy required by the software itself, and M is the proportional energy required to produce and dispose of the underlying hardware.

The Carbon Aware SDK [12], on the other hand, is something that developers can integrate into their own applications to take advantage of fluctuating energy prices in an environmentally smart way. The Carbon Aware SDK, which you can use either at the command line or via web API, is often used with non-time-critical machine learning jobs. The SDK helps move workloads to other cloud regions where renewable energy is cheap at the moment. Alternatively, it helps to throttle back operations as a function of the type of energy. The people behind the project refer to CO2 reductions in the double-digit percentage range.

Green Coding

The tools of the GSF are available to everyone, but the foundation itself is based in the US and is primarily funded and maintained by US-based corporations. However, similar efforts are taking place in Europe. Green Coding Berlin, for example, is a German-based organization that believes digitalization will only have a positive impact on society if it is sustainable. Green Coding is looking to develop open-source measurement tools that determine the energy requirements of software and infrastructure. The aim is to create a community and an ecosystem centered around green software. To this end, Green Coding cooperates with the Sustainable Digital Infrastructure Alliance (SDIA [13]), an alliance of several companies with a roadmap for a sustainable digital infrastructure.

Green Coding offers the Green Metrics Tool [14], a container-based utility that is currently only intended for experimentation and testing. Green Metrics can help you measure the storage space per container, the CPU utilization as a percentage, or the system-wide power consumption. A Python API fields the metrics, and a JavaScript web front end visualizes the results (Figure 1).

Figure 1: The Green Metrics tool takes measurements on containers and then visualizes the readings.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Blue Angel Eco-Label

    Germany created Blue Angel, the world's first eco-label for software, back in 2000. The methodology behind Blue Angel could serve as a model for other countries as governments turn their attention to the environmental impact of software.

  • Sustainability by Design

    Sustainability studies for the IT industry often ignore the contributions of software. This article explores what developers and admins can do to create and maintain more energy-efficient systems.

  • FOSDEM 2023

    After two years online, crowds of FLOSS supporters returned to Brussels in early February for FOSDEM 2023. Reminiscent of a class reunion, the FOSDEM keynote program was jam packed with goodies.

  • Energy-Efficient Software

    Go has a reputation for producing energy-saving applications, but you still have to know what you are doing.

  • Ubuntu on Pilot Light: wattOS Beta 3

    The goal of wattOS is simple and useful: to build a Linux distro that uses little energy.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News