Measuring computers’ carbon footprint with “Green Algorithms”

by | May 3, 2021

A new, open-source platform allows scientists to easily measure the carbon footprint of their computations.

Image credit: Markus Spiske on Unsplash

What strategies come to mind when we’re asked to think about cutting greenhouse gas emissions? Moving to renewable energy sources? Eliminating our dependence on carbon-based fuels? Eating less meat? All are intuitive examples of ways in which this can be done.

However, as our computing capabilities and the amount of data that we generate each year continue to grow, so do their contributions to carbon emissions, though perhaps in a less direct way. “Compared to the very obvious carbon emissions of a car, for example, the environmental impact of computing is much more abstract,” said Loïc Lannelongue, a Ph.D. candidate in AI and medicine at the University of Cambridge. “Fridges, dishwashers, TVs, cars etc., all these devices promote their low energy needs and sustainability: being (or claiming to be) environmentally friendly is now a key element of an advertising campaign as well as a legal requirement in many cases.”

Many important scientific milestones have been achieved thanks to the development of high-performance computing; however, their resultant environmental impact has been underappreciated.

Data centers contribute to carbon emissions through electricity consumption, both in terms of powering computers for computing and for long-term data storage, resulting in an estimated 100 megatonnes of CO2 emissions produced per year similar to American aviation contributions. Secondary environmental impacts related the extraction and disposal of raw materials for computer hardware are another significant problem. “Around 75% of the total environmental impact of consumer devices comes from producing [them],” added Lannelongue. “Hence the importance of keeping [all our] devices for longer.”

There also exists a disconnect between researchers carrying out computations and the end result. “Computing time is virtually free for a lot of scientists who usually have access to large institutional servers or powerful computers without seeing the electricity bills,” said Lannelongue. “Sometimes this can lead to excessive usage and wasted resources. Factoring in the environmental cost would shatter this illusion of ‘free computing’ and would help us acknowledge our contribution to the man-made climate emergency.”

The problem is, little research has gone into determining exactly how much greenhouse gases are contributed by computing. “Even for scientists who would like to estimate their carbon footprint, until recently this was excessively difficult to do so and required extensive research on the environmental impact of each hardware component,” he added. “Without data, the problem has mostly been ignored, which is what motivated the Green Algorithms project.”

In a new study published in Advanced Science, Lannelongue and his colleague Jason Grealey, led by Professor Michael Inouye, have developed an open-source tool to estimate the carbon footprint of any computational task, such as powering laptops or servers in a data center.

“We do so by estimating the energy needed and then look at the greenhouse gases emitted to produce it,” he explained. “At first, it may look difficult to do, but we boiled down the important parameters to a handful of easily accessible concepts: how long the algorithm runs for, what hardware (CPU, GPU, memory) is used, and in which country is the computer based. Scientists can then simply plug these into the online calculator, and it will tell them the estimated carbon footprint of their work, in grams of CO2-equivalent.”

The calculator also puts the result into context by comparing it to driving or flying and shows how many months it would take a tree to remove this quantity of CO2 from the atmosphere. “We called this metric ‘tree-months’,” said Lannelongue.

Making the platform freely available was important to the group as one of the main challenges in estimating these numbers is a lack of data. It was therefore important to remove any barriers or sources of friction to help scientists better understand the environmental impacts of their work. “It was also important that users trust the estimated carbon footprint and understand where the results come from, which is why all the code and data is open source,” added Lannelongue.

The team believes that Green Algorithms will help to raise much needed awareness, which in turn could translate into greater consciousness and a reduced footprint. “We have found that most computational scientists do care about this issue once made aware of it, and simply showing them the magnitude of their carbon impact goes a long way toward changing habits,” said Lannelongue.

This sentiment was reflected by Jon Kragskow, a Ph.D. student in the Department of Chemistry at the University of Manchester, UK, who was not affiliated with this study. “Having inputted data from my own programs I am genuinely surprised by my footprint, as I have never considered this before!” he said. “As scientists, we must begin to realize the impact of our computer code on the environment, as it’s easier than ever to both learn to program and to execute your code on inexpensive yet powerful systems. This is a thankfully lightweight way to easily calculate the cost of your own research and I think that such analysis must become commonplace.”

In their paper, as well as their website, Lannelongue and his co-workers outline what factors influence the environmental impact of a task as well as concrete ways to reduce it. For example, weather forecasts are carried out using sophisticated simulations of different atmospheric/oceanic interactions (in simple terms), and so the researchers modeled the carbon footprint of a commonly used algorithm called ICOsahedral Non-hydrostatic (ICON), whose predictions are used by more than 30 national weather services.

They estimated that each day, ICON releases approximately 2.5 tons of CO2, equivalent to driving 13 215 km or flying from New York to San Francisco four times. In terms of carbon sequestration, the emissions from each day of an ICON weather forecast are equivalent to 2523 tree-months (i.e., it would take 210 years for one tree to absorb this amount of carbon). Solutions to help make processes such as these become more sustainable include limiting the number of times an algorithm runs, moving the computations to a more efficient data center with lower carbon intensity, and contributing to carbon offsetting initiatives to compensate for the carbon footprint.

“This technology and high-powered computing isn’t going anywhere,” said Lannelongue, “and this is a good thing. The potential benefits are huge in biology, medicine, or even to tackle climate change. So the question is rather how do we make computing as sustainable as possible, and how do we ensure that the expected benefits outweigh the environmental price for every single project, not only overall?

“[Green Algorithms] can incentivize institutions to be transparent about their impact, invest in greener facilities, and promote more sustainable practices,” he added. “We hope that this work is a steppingstone towards normalizing the acknowledgment of carbon footprints in research projects.”

Reference: Loïc Lannelongue, Jason Grealey, Michael Inouye, Green Algorithms: Quantifying the Carbon Footprint of Computation, Advanced Science (2021). DOI: 10.1002/advs.202100707

ASN Weekly

Sign up for our weekly newsletter and receive the latest science news.

Related posts: