At INNOQ, our goal is to create a more sustainable world, recognizing that technology plays a crucial role in achieving this. We have already taken steps to reduce our environmental impact, such as sourcing green energy for all our German offices and implementing intelligent heating control in some of them. Additionally, a lot of us have shifted to train travel and we have increased remote work among our colleagues. However, we recognize that there is an additional lever — the products we develop for our customers. This is why the concept of Green IT, or developing environmentally sustainable software products, is something more and more colleagues at INNOQ set great value on. In this article, we will explore why we believe this is important, what steps can be taken to achieve it, and provide an overview of the topic of Green software development.
Why is ecologically sustainable software development important?
In order to develop those types of software products, we need first to understand what ecological sustainability is and how it applies to IT in general and to software development in particular. The basic principle is that people should live in such a way that the available resources are not consumed at a higher rate than they are able to regenerate. It touches on all the biogeochemical systems such as water, ecosystem services, and more. However, when it comes to the impact of Information and Communication Technology (ICT) as an industry, the greatest one is on the amount of greenhouse gas emissions.
The rapid expansion of the industry in recent decades has led to a significant increase in power consumption. It is projected to grow from 2000 TWh in 2010 to 8000 TWh by 2030. Additionally, the percentage of electricity consumed by ICT is expected to rise from around 5% in 2012 to an estimated 21% in 2030. All the software products that we are creating at INNOQ or that are created worldwide have an impact on energy consumption. Knowing the three-tier energy impact that they make can help us design them in such a way that we are able to reduce their negative impact.
The consumption patterns that led to this increase are usually categorized into three different buckets or orders of effect.
- first-order effects: the energy used to produce and use ICT, for example, operation of servers, network infrastructure, the energy consumption of end devices used to access the application (laptops, smartphones, etc.), but also energy consumption during application development
- second-order effects: the direct consequences of using ICT — for example, an application that helps to avoid car trips is better than one that helps to develop new oil deposits
- third order effects: the long-term adjustments and innovations caused by ICT — for example, the development of new hardware may lead to certain ML algorithms becoming feasible to use in practice, which can eventually lead to the design of more efficient wind turbines.
In this article, I will focus on the first-order effects, as it is unlikely that we will be able to significantly impact customers' product ideas and subsequently the secondary or tertiary effects.
It is informative to examine the breakdown of electricity consumption by location before discussing how to address it. Networks, including mobile, broadband, and telephone, account for approximately 1.7% of global electricity consumption. Data centers consume about 1.4% and computers consume 1.6%. Notably, networks and data centers make up the majority of energy consumption throughout the lifetime of tablets and smartphones, accounting for at least 90% of total energy use, including manufacturing and charging.
Principles of environmentally sustainable software development
The topic has started gaining momentum lately in the software industry, and there are actually some guiding principles that one can use to understand what it involves. They have been developed by Asim Hussain, Green Cloud Advocacy Lead at Microsoft. The principles of Green Software Engineering are essential skills needed to create, develop, and operate sustainable software applications that are environmentally friendly. It is crucial to note that these principles can be implemented regardless of industry, programming language, hosting strategy (cloud or self-hosted), and expertise.
The principles aim to empower readers to significantly reduce the carbon emissions produced by their software by emphasizing efficiency, intensity, demand, and awareness. They are organized into eight categories.
Maximize CO₂ Efficiency
1. Carbon Efficiency
Carbon serves as a placeholder for all greenhouse gases that trap heat in Earth’s atmosphere, leading to an increase in temperature. To measure carbon efficiency, the metric used is not just the amount of CO₂, but CO₂-equivalent (CO₂e), which takes into account the relative warming potential of different greenhouse gases. The goal is not to eliminate carbon emissions completely, but rather to minimize waste and design applications with efficiency in mind from the start.
2. Energy efficiency
Carbon efficiency and energy efficiency are closely linked, and energy efficiency can be used as an indicator of carbon efficiency. As a significant portion (over 49%) of carbon emissions come from producing energy from fossil fuels, it is crucial to building software that consumes as little energy as possible. However, energy efficiency is also important if your software runs completely on renewable energy because building renewable energy power plants cannot be done without emissions either.
Use electricity with the lowest possible CO₂ intensity.
3. Carbon intensity
Nevertheless, renewable energy power plants enable us to decrease our carbon intensity. Carbon intensity is a measure of the grams of carbon emitted per kilowatt-hour or gCO₂eq/kWh. If we are using 100% renewable energy, the carbon intensity is close to zero, while in other cases it will vary according to the energy mix. If we achieve an over-supply of energy through renewable sources, it will increase the chances of carbon-emitting power plants being shut down temporarily. If this happens, the carbon intensity of the local grid will decrease.
If you want full control over your carbon intensity, you need to be independent of the local grid. There are a couple of real-world examples where servers are operated in a self-sufficient way with 100% green energy. An example at scale is a data center in Nevada that is powered by solar panels with a capacity of 555 MW and Tesla Megapacks providing 800 MWh of battery storage. This is necessary to ensure that the data center provides high availability even when the sun doesn’t shine. In general, if you want to use 100% green energy, you need to dramatically oversize both your power sources and your battery storage. However, this is hardly sustainable and can sometimes even cause more emissions than you are trying to avoid, depending on the carbon intensity of your local grid. In stark contrast to this, the low-impact version of the Low Tech Magazine is hosted on a server in the owner’s apartment in Barcelona, and the server is powered by a single solar panel and a small battery. While this setup is not as efficient as a big data center because it cannot benefit from scaling effects, Low Tech Magazine recognizes that the high availability we have come to expect from almost all server applications these days cannot align with the goal of ecological sustainability. This is why the website goes offline if there is no solar power and the battery is empty. Nevertheless, the website has an average availability of more than 95 percent, which is probably more than you may have expected from such a radical approach.
4. Demand Shifting
Currently, there is not enough green energy in all places and at all times to run your servers completely on green energy in a sustainable way with the availability demands we have grown used to. One way to minimize the carbon intensity of your software is to run energy-intensive tasks during times of high green energy availability. This technique is called demand shifting. This can decrease carbon emissions by 45–99%, as per a study.
One example where this really pays off is training a deep-learning model for natural language processing, which can emit the equivalent of 284 tons of CO₂, according to a MIT study. Since this is not a time-sensitive task, it can be done when there is enough green energy on the local grid or in a location where green energy is more readily available.
Companies like Google are using tools like Electricity Map or other carbon intensity APIs to align compute tasks with times of high low-carbon energy availability. Typically, these APIs can provide you with data on current carbon intensity, historical data, and forecasted carbon intensity in multiple regions.
Maximize hardware efficiency
5. Hardware efficiency
The carbon emissions associated with the production and disposal of a product, known as embodied carbon, can also be significant. In some cases, this is measured in terms of carbon emissions per year, based on the lifetime of the device. For example, a 2019 Dell R640 server has an embodied carbon cost of 320 kg CO₂eq per year, which is equivalent to 40% of the device’s yearly emissions based on the average carbon intensity in the EU in 2019. In some cases, such as smartphones, the embodied carbon cost can be even higher than the device’s lifetime emissions created from using it, e.g. from charging it (not taking into account emissions from servers and network infrastructure that are utilized while using the device).
One strategy for increasing hardware efficiency is to extend the lifespan of hardware, which reduces the yearly embodied carbon cost. As software engineers, we can design software that is resource-efficient and can run smoothly on older devices. Also, by designing software that is energy efficient, we can do our part in reducing the number of charge cycles required in a given time span for laptops, tablets, and smartphones. That way, we contribute to a longer lifetime and hence a smaller embodied carbon cost for these devices.
Minimize data transfers
6. Network efficiency
Data transfers are a major contributor to energy consumption in the industry, and their associated carbon emissions are influenced by factors such as the size of the data, the distance it needs to travel, the number of network devices it passes through, the energy efficiency of those devices, and the carbon intensity of the local grids that power them. Based on current research, it can be assumed that transmitting 1 GB of data requires 0.81 kWh. With a global carbon intensity of 442 gCO₂eq/kWh, this means that transmitting 1 GB of data leads to emissions of 358 gCO₂eq (see Calculating Digital Emissions).
Sometimes, avoiding just a small amount of data to be transferred can have a huge impact. One example of this is a WordPress plugin created by Danny van Kooten. He removed a 20KB JS dependency. Since the plugin was used on 2 million websites, this resulted in an estimated saving of almost 3 tons of CO₂eq per month. According to van Kooten, those three tons of CO₂eq are what you would emit by driving more than 18,000 km with his Toyota Yaris.
Build CO₂-adaptive applications
Demand shaping is a technique that adapts the energy demand of an application to the current supply of green energy. To do demand shaping, the application needs to be carbon-aware, for example by using one of the available carbon intensity APIs mentioned above. Demand shaping can happen automatically or by giving the users a choice, such as an „eco-mode“ option. This is similar to a form of progressive enhancement where the system adjusts its energy consumption based on the current energy supply.
If the carbon intensity is too high, or the user activates an eco-mode, you can choose to deliver images in lower resolution or quality or omit certain images or video content altogether. Some websites like Organic Basics or Branch Magazine have implemented this feature. In the former, there is an explicit eco or low-impact version that you can choose to use instead of the regular storefront. The low-impact version automatically adapts to the current carbon intensity by using vector graphics instead of high-resolution product photos, for example. The latter adapts to the current carbon intensity automatically, for example by reducing the image quality or even omitting images completely until they are explicitly requested by the user. In addition, visitors can choose to browse the website in low, medium, and high grid intensity mode, effectively overriding the automatic adaptation.
The Branch Magazine adjusts its design based on fossil fuel levels to maintain a carbon budget. There are four browsing options available from “Low” to “High” plus the “Live” mode that resolves to one of the other three automatically.
Examples when Intensity of Grid usage is:
Measurement & Optimization
It’s important to understand, though, that all these metrics never tell you the whole story. Getting a precise measurement of all the carbon emissions caused by your software is almost impossible, since a lot of components, like the network infrastructure and the end-user devices, are usually a black boxes. Some measures you take in order to reduce emissions in one part of the system can actually increase emissions elsewhere. For example, moving computations from your server to the end user devices could reduce the emissions on the server side, while increasing them on the end user devices, possibly leading to an overall increase in the emissions caused by your application.
Ecological sustainability in practice — a pipe dream?
Considering all the metrics, principles, and examples reviewed until now, the normal question that arises is if this is actually possible to integrate in everyday work. The starting point to reflect on it would be the fact that there are very few stakeholders in the business space that do have environmental sustainability as their main or primary goal. It might be the case that they are not even aware of how much of an impact IT in general and website and software products have on greenhouse gas emissions. This is one of the main reasons why carbon efficiency as a quality goal of software architecture will probably remain an exception for the moment. One of the exceptions we assume will adopt carbon efficiency soon is when software is developed for the public sector. Here, we already have much stronger requirements regarding accessibility than in the private sector. It’s not far-fetched to expect them to act as trailblazers when it comes to adding carbon efficiency as a strict requirement as well.
For now, though, it is recommended to start by aiming for carbon emissions reduction through secondary goals that align with business objectives. These goals could include cost efficiency by reducing servers and traffic, accessibility by designing web applications to be less data-intensive, and performance by minimizing data transfer. However, it’s important to note that carbon efficiency does not always align 100% with these other quality goals. For instance, while many performance measures also improve carbon efficiency, some definitely don’t, and may even increase emissions. For example, querying a document from multiple nodes in a distributed database in parallel and using the fastest response may improve performance, but is not CO₂-efficient at all. It is essential to introduce stakeholders to environmental sustainability through other goals, and sensibly focus on carbon efficiency as a desirable goal. Once carbon efficiency is established as an explicit goal of its own, such trade-offs between other quality goals and carbon efficiency can and need to be made explicit.
Getting started with reducing the environmental impact of software can be challenging, but it is important to view all work through a sustainability lens. Utilizing tools and principles to assess, measure, and minimize the impact of software is crucial. Raising awareness about the impact of software on the environment and making it a priority among stakeholders is essential for success.
- C.Kelly; E. Mangina; A. Ruzelli Putting a CO₂ figure on a piece of computation, IEEE 2011
- R. Hischier, V.C. Coroama, D. Schien, et al., Grey energy and environmental impacts of ICT hardware, ICT Innovations for Sustainability, Springer, 2015, pp. 171–189