Green IT – Are We as Software Engineers Doing Enough?
When I think of the color green, to me it represents refreshing, nature, and renewal. Afterall, green is everywhere. However, as part of the software industry, it makes me think – Are we doing enough to ensure that the color green in nature remains dominant?
The Paris Agreement, signed in 2016, looks at climate change mitigation, adaptation, and finance. Several organizations have since come forward to crack the climate crisis and solve the challenges of decarbonizing the economy. We regularly hear about organizations disclosing their reduction in carbon footprint, or their plans to achieve net zero emissions.
There is also a shift that was accelerated due to the pandemic around the digitalization of businesses. IDC has predicted digital transformation investments to reach USD 6.8 trillion [1] by 2023. Technology enabled by software is the foundation stone for this digitalization. Software needs storage, compute, and networks to run and function. All of this consumes energy. Hence, there is an urgent need for the software engineering community to understand the impact of software on the carbon footprint.
A recent study undertaken by researchers in Portugal [2] published some interesting findings. On average, compiled languages consume 120J [joules], and interpreted languages consume 2365J to execute given sample solutions. That essentially means C code is 75 times more energy efficient than Python code. MIT Technology Review article [3] stated that training a single AI model could emit as much carbon as five cars in their lifetime.
So as software engineers, we should start by asking two questions –
- How do I know what is the carbon impact of the code that I write?
- What can I do to reduce the carbon footprint of my code?
These are the questions that the “Green Software Engineering” movement is attempting to answer. Green Software Engineering brings in a holistic view on climate science, software practices and architecture, cloud, data centers and hardware.
Measuring Green Debt
Today, calculating technical debt is standard practice for software engineers. Tools like SonarQube and CAST are used to understand the code performance. The outputs from these tools can be extended to calculate the “Green Debt”. Research is also happening in the software community around dedicated tools and plug-ins that can directly provide statistics about energy performance. As these tools become mainstream, I will not be surprised to see “Green Debt” become one of the key metrics for software quality and maintainability.
Leveraging approaches like serverless architectures or containerization is a good first step towards designing code that is more energy efficient. Essentially, serverless computing provides services only when they are needed. This architecture can be further enhanced using other sustainable patterns like Edge computing and Delayed compute. A container is a stand-alone, scaled-down unit of a computing environment that can run executable code, contributing to a smaller carbon footprint. In addition to that, focusing on code optimization techniques [4] while writing the code itself – like reusing already computed values or avoiding unnecessary stores of variables, extra loads of memory and register-to-register moves. If you are designing a data intensive application, you can focus on solutions patterns that reduce the data movement.
Next steps
While these are a few glimpses of techniques that a software engineer can start , a lot more needs to be done to enable Green Software engineering. Right from creating awareness via training and enablement to bringing in standardized SDLC processes and practices that incorporate this thinking is crucial. It is high time we as software engineers start thinking about the footprints that our code leaves behind and truly embrace “Green as our color”. Do you agree?
References
https://www.idc.com/getdoc.jsp?containerId=prMETA47037520
Energy Efficiency across Programming Languages (uminho.pt)
https://www.technologyreview.com/2019/06/06/239031/training-a-single-ai-model-can-emit-as-much-carbon-as-five-cars-in-their-lifetimes/
https://www.researchgate.net/publication/344777653_Energy_Efficient_Software_Development_Techniques_for_Cloud_based_Applications
More from Archana Joshi
Today, generative AI or Gen AI is solving complex challenges that require data-driven insights,…
The potential that can be harnessed from Metaverse is exponential. Metaverse promises to be…
In the previous blog post on Remote Transition, it was mentioned how some of the conventional…
Latest Blogs
Tired of spending countless hours troubleshooting failed API tests and keeping up with constant…
The business world is moving quickly and the only way to make informed decisions is to leverage…