What Is Green Software

Green Software is a concept defined by the Green Software Foundation with the goal to reduce the emission of CO2 to combat climate change. There are other terms in the realm of sustainability, but in this post, I want to focus on green software. The green software foundation is a non profit under the linux foundation. It defines green software with the following diagram. The goal of green software, is to reduce the amount of carbon emitted, not the neutralization of carbon that has already been emitted. It puts the software in the focus, as it is the main driver of CO2 in our IT solutions.

Green Software

Let’s have a look at the different principles on this diagram and their meaning:

Carbon efficient

The goal of the carbon efficient principle, is to emit less carbon. This can be achieved by either using less energy during production (energy efficient) or by using less hardware (hardware efficient).  Depending on the device and its application energy efficiency or hardware efficency dominate its life-cycle. For servers, the carbon emitted during the usage phase by its energy use is significant. Improving the code efficiency can be beneficial in this situation. On the client side, most carbon is emitted during production. The energy used during the use of your tablet, cell phone or laptop is almost negligible. Therefore it is more important to make software, that does not reduce the lifecycle of the client device (i.e. backward compatibility to older platforms).

Energy Efficient

Energy Efficient Software uses the minimal energy to perform the necessary tasks. This can be achieved with different means. The obvious one is to write energy efficient code. A big mover, and something that is often easier to implement, is the use of less energy intensive languages, frameworks and libraries. Another big factor is to just do less. Use a lean approach to building software and question everything if it is really necessary.

Hardware Efficient

To become hardware efficient, we need to do two main things. The first is to maximize the utilization of the hardware. This is due to the fact, that each hardware has so called embodied emissions which happen during production, transport and disposal. The second is to optimize utilisation. The more we can run on one piece of equipment, the less we need to buy and therefore the amount of embodied carbon is reduced.

Carbon aware

If we try to be carbon aware, we try to use the energy in locations or at points in time, where the same amount of energy can be produced by emitting less carbon. This has become feasible due to advancements in cloud infrastructure, as data centers increasingly support regional or temporal shifts in workload. Online services such as electricty map can deliver the real time data to make the right decisions. The part of the software which is running in datacenters offers us often a lot of control. We can chose where and when to run the code. We can move our code into different regions of the world where currently the energy is greener. With demand shaping you can try to move the demand of your application to a more optimal point in time or even reduce it. Non time critical tasks such as batch jobs, backups or AI model training can be moved to a time when the energy is less carbon intensive. On the client we have less influence on some things, many of them we can’t even measure. We (usually) have no idea how green his electricity is and we probably struggle to measure it on his device. Measurement and Monitoring You can not improve what you do not know. That’s where measuring and monitoring comes into play. We are still at the start of the journey to learn how we can do this in our increasingly complex IT-landscape. There are many points in the life-cycle, where we can measure the CO2equivalents emitted by our solution. We can measure our Testruns, how much our servers use or how efficient a webpage is. There is no single measurement of truth.

Conclusion

Green Software is a useful framework which can help us understand the areas we need to work on to reduce the carbon emissions of our IT-solutions. The principles “energy efficient”, “hardware efficient and “carbon aware” give us the guidelines where we can start improving.  This overview is on a very high level and each of the principles contains much more to learn. If you want to know more, follow me here, have a look at the material on the green software practitioner course or read the fantastic book “Building Green Software” by Anne Currie. Even if the whole subject looks big and daunting, the most important thing is to get started. Chose a principle, start to learn more about it and start to implement it!