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
-
New Slimbook EVO with Raw AMD Ryzen Power
If you're looking for serious power in a 14" ultrabook that is powered by Linux, Slimbook has just the thing for you.
-
The Gnome Foundation Struggling to Stay Afloat
The foundation behind the Gnome desktop environment is having to go through some serious belt-tightening due to continued financial problems.
-
Thousands of Linux Servers Infected with Stealth Malware Since 2021
Perfctl is capable of remaining undetected, which makes it dangerous and hard to mitigate.
-
Halcyon Creates Anti-Ransomware Protection for Linux
As more Linux systems are targeted by ransomware, Halcyon is stepping up its protection.
-
Valve and Arch Linux Announce Collaboration
Valve and Arch have come together for two projects that will have a serious impact on the Linux distribution.
-
Hacker Successfully Runs Linux on a CPU from the Early ‘70s
From the office of "Look what I can do," Dmitry Grinberg was able to get Linux running on a processor that was created in 1971.
-
OSI and LPI Form Strategic Alliance
With a goal of strengthening Linux and open source communities, this new alliance aims to nurture the growth of more highly skilled professionals.
-
Fedora 41 Beta Available with Some Interesting Additions
If you're a Fedora fan, you'll be excited to hear the beta version of the latest release is now available for testing and includes plenty of updates.
-
AlmaLinux Unveils New Hardware Certification Process
The AlmaLinux Hardware Certification Program run by the Certification Special Interest Group (SIG) aims to ensure seamless compatibility between AlmaLinux and a wide range of hardware configurations.
-
Wind River Introduces eLxr Pro Linux Solution
eLxr Pro offers an end-to-end Linux solution backed by expert commercial support.