Understanding the ecological impact of digital
As in quantum physics, in ecology, reality does not exist until it is observed. The action that enables us to move from the world of possibilities to the world of what we know is that of measurement. This is particularly true in the modern world, where technology has come to dominate.
Today, the use of digital technology could lead us to believe that our actions, once digitized, no longer have any physical impact on the surrounding world. This is obviously not true, and is a direct consequence of the apparent disconnect between technology and nature. This is where digital ecology comes in, as it aims to analyze and reduce the environmental footprint of digital technologies.
The aim of this article is to provide an introduction to digital ecology, bridging the gap between the use of a digital product and its ecological impact. Every technological product relies on a supply chain that has produced the hardware and provides the energy required for its use. The main carbon footprint of most technological products is generated during production. Thereafter, their impact depends mainly on the energy requirements of the algorithms used and the frequency of use.
Measure the carbon footprint of a digital project
Digital ecology is particularly concerned with the carbon footprint of digital technologies. Indeed, even in an ideal world where energy had low carbon emissions, the environmental impact caused by the search for resources and the use of energy itself would still be unavoidable. It is therefore essential to take this into account when assessing carbon emissions, in order to avoid favoring low-carbon impact activities that could, despite everything, harm ecosystems. [1]
Imagine you want to calculate the carbon footprint of your digital project. This is usually expressed in the unit of measurement "Equivalent Kg. CO2" (eqCO2). This unit of measurement compares the impact of different greenhouse gases (GHGs) in terms of carbon dioxide (CO2). The most common and well-known. The amount of eqCO2 generated by a digital tool depends on the carbon intensity of the electricity production chain. To get an idea of how to calculate the carbon footprint, we can estimate the eqCO2 according to the different types of energy sources available at national level [1]. Fig.1 shows the carbon intensity of several types of electrical energy.
In formulas, carbon intensity (CI), defined as the carbon footprint (eqCO2) per unit of energy (KWh), can therefore be calculated as :
Where 𝜂 is the carbon intensity for each energy source i and 𝛼 is the percentage of the energy type that depends on the country considered.
To better understand the quantities involved when we talk about digital ecology, the French government has made available a carbon emissions comparator. For example, considering that Chat-GPT emits on average 1.5 g eqCO2 per request [3], 100 requests (0.15 kg of CO2) correspond to the emission of an LED light bulb switched on for 20 hours.
Measure the energy consumption of a Python script
One of the pillars of digital ecology is the measurement and optimization of software energy consumption. Specific tools are available, notably for measuring the emissions associated with Python code. Measuring a script's carbon footprint not only helps reduce your electricity bill, but also makes you aware of the daily ecological impact of your work as a developer.
Among the various packages that can be used to measure the carbon footprint of Python code, we find AIPowerMeter. It provides numerous details such as memory footprint and CPU time. Another more industrial and dockerized package is Scaphandre.
The CodeCarbon package is the most popular for Machine Learning running on a local machine. If you want to measure CPU consumption, access to the CPU system via the RAPL interface is required. So it doesn't work on virtual machines in the cloud. Using the EmissionsTracker class in this package, we can, for example, measure energy consumption during model training, as illustrated in Fig.1.
Other ways of using this package are also available here [4].
And AI in all this?
All the main AI models, as well as modern models such as Chat-GPT, Chat Mistral and Gemini, have one thing in common: they are all extremely energy-intensive. For example, Google and Microsoft, whose respective energy consumption already surpasses that of many countries, have seen their consumption increase as a result of the massification of AI models. In 2024, Google saw a 48% increase in CO2 emissions compared to 2019. While Microsoft reported a 30% increase in a single year.
In addition to energy, AI relies on the massive use of water to cool servers. According to researchers who have studied the water impact of AI [5-7], GPT-3 training alone used 700,000 liters of water. As far as AI use is concerned, asking Chat-GPT between 20 and 50 questions not only produces between 30g and 75 of eqCO2, but also a water consumption equivalent to that of a bottle of water. A study published in the journal Science Advances [9] estimates that the total water consumption of AI models is between 3 and 6 million cubic meters per year, equivalent to the consumption of at least 300,000 people [9]. Another study by a group of researchers at the University of Massachusetts [10] estimates the water consumption of a single AI model like ChatGPT at around 6,000 liters of water per hour.
Taking into account the different types of AI and the current progression of water demand, it is estimated that global demand for water from AI could reach between 4.5 and 6.5 billion cubic meters of water by 2027 [5-7]. This is equivalent to half the UK's annual consumption. According to RTE's electricity balance sheet [8], OpenAI would use 564 MWh per day to run ChatGPT-3.
Final considerations
Digital ecology is an essential discipline for reconciling technology and sustainability. It should be clear by now that the use of digital services has a considerable impact on the environment around us, even if we're not always immediately aware of it. In this article, we've laid the foundations for understanding the ecological impact of electricity use and different types of energy, by linking the use of digital devices to their ecological footprint. We also explored how to measure the energy consumption of a Python script and compare it with more intuitively accessible units of measurement. Finally, we looked at the use of water in data centers, realizing the huge impact they have on our ecosystem.
Now that we've invented artificial intelligence, it's our responsibility to integrate it harmoniously and sustainably into our ecosystem. The future of technology lies in a real understanding of the challenges of digital ecology, for a world that is more respectful of the environment.
Sources
[1] Donella H. Meadows [and others]. The Limits to Growth; a Report for the Club of Rome's Project on the Predicament of Mankind. New York: Universe Books, 1972.
[2] Electricity mixes per country (Our world in data)
[3] https://blog.ekip.app/quelle-est-lempreinte-carbone-de-chatgpt/
[4] Code carbon examples
[5] J. Harris, "ChatCO2 - Safeguards Needed For AI's Climate Risks", Greenpeace
[6] Pengfei Li et al, "Making AI Less "Thirsty": Uncovering and Addressing the Secret Water Footprint of AI Models", arXiv (April 6, 2023)
[7] A. Shaji George et al, "The Environmental Impact of AI: A Case Study of Water Consumption by ChatGPT", Partners Universal International Innovation Journal (PUIIJ) Volume: 01 Issue: 02 | March-April 2023
[8] RTE Electricity balance 2023
[9] Mytton, David. "Data Centre Water Consumption - Npj Clean Water." Nature, Feb. 15, 2021
[10] "Reduce Water Usage: 10 Ways to Lower Water Consumption | Install-It-Direct." Reduce Water Usage: 10 Ways to Lower Water Consumption | Install-It-Direct, Aug. 14, 2012.
[11] Carbon Comparator
Marco FAGGIAN
Data Scientist Consultant