Repositories for energy-saving software
Going Green
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).
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
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.
News
-
Latest Cinnamon Desktop Releases with a Bold New Look
Just in time for the holidays, the developer of the Cinnamon desktop has shipped a new release to help spice up your eggnog with new features and a new look.
-
Armbian 24.11 Released with Expanded Hardware Support
If you've been waiting for Armbian to support OrangePi 5 Max and Radxa ROCK 5B+, the wait is over.
-
SUSE Renames Several Products for Better Name Recognition
SUSE has been a very powerful player in the European market, but it knows it must branch out to gain serious traction. Will a name change do the trick?
-
ESET Discovers New Linux Malware
WolfsBane is an all-in-one malware that has hit the Linux operating system and includes a dropper, a launcher, and a backdoor.
-
New Linux Kernel Patch Allows Forcing a CPU Mitigation
Even when CPU mitigations can consume precious CPU cycles, it might not be a bad idea to allow users to enable them, even if your machine isn't vulnerable.
-
Red Hat Enterprise Linux 9.5 Released
Notify your friends, loved ones, and colleagues that the latest version of RHEL is available with plenty of enhancements.
-
Linux Sees Massive Performance Increase from a Single Line of Code
With one line of code, Intel was able to increase the performance of the Linux kernel by 4,000 percent.
-
Fedora KDE Approved as an Official Spin
If you prefer the Plasma desktop environment and the Fedora distribution, you're in luck because there's now an official spin that is listed on the same level as the Fedora Workstation edition.
-
New Steam Client Ups the Ante for Linux
The latest release from Steam has some pretty cool tricks up its sleeve.
-
Gnome OS Transitioning Toward a General-Purpose Distro
If you're looking for the perfectly vanilla take on the Gnome desktop, Gnome OS might be for you.