BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Green Software Development - What Can You Do Now, and Where is the Industry Heading?

Green Software Development - What Can You Do Now, and Where is the Industry Heading?

Making code more efficient often ends up saving carbon. Storing less information and compressing it can also lower your carbon footprint. There are open-source projects and standards and guides available that can be used to increase sustainability in software development. Measurement standardization is needed to compare the environmental impact of cloud suppliers.

Adrian Cockcroft spoke about sustainability in development and operations at QCon San Francisco 2022 and will give a talk about the future of sustainability measurements at QCon London 2023.

In most cases, working to optimize for saving money by making code more efficient will also end up saving carbon, Cockcroft said. This helps focus work, as if you aren’t spending a significant amount of money on running the code, then it’s probably not worth worrying about it from a sustainability perspective.

Some specific ideas for developers that Cockcroft mentioned are to do less work in the first place by being thoughtful with business requirements and using better algorithms. Then to use more efficient languages like Rust to implement compute intensive code, pick highly optimized libraries like simdjson.org for JSON processing, and Z-STD for compression.

Further, he suggested storing less information and compressing it if it’s going to persist. Set up storage lifecycle optimization like S3 Intelligent Tiering or archive to tape which has the lowest carbon footprint. For frontend work, minimize the size of images and code in web pages, and tune mobile apps to use less power.

Cockcroft mentioned several open source projects aimed at measuring the energy use of Kubernetes based workloads: KEPLER: Kubernetes Efficient Power Level Exporter, Quarkus, a very efficient Java framework that enables significant savings compared to traditional Java stacks, CLEVER (Container Level Energy-efficient VPA Recommender that uses Kepler as an input for a Vertical Pod Autoscaler recommender, and PEAKS (Power Efficiency Aware Kubernetes Scheduler).

InfoQ interviewed Adrian Cockcroft about sustainable software development.

InfoQ: What can be done in software development to increase sustainability?

Adrian Cockcroft: When significant optimization projects try to calculate their cost savings, it’s good to try and estimate and report carbon savings at the same time. The area that isn’t obvious is that carbon varies by location, in ways that don’t correlate with cost.

From an energy consumption point of view, workloads running on all the major cloud vendors in Europe and the US are using close to 100% renewable energy nowadays. Carbon emissions are dominated by workloads running in Asia, where it is harder to build and buy renewable energy.

However, from an infrastructure perspective, the carbon used to create silicon, package into computers and place them in datacenters is roughly the same for everyone, everywhere, and is now dominating the carbon footprint of IT as scope 3 emissions, which measure the carbon footprint of your supply chain.

InfoQ: Where can InfoQ readers get guidance and information if they want to increase sustainability?

Cockcroft: The AWS Well Architected Pillar for Sustainability and the Azure Well Architected guide provide support for cloud optimization. I helped write the AWS one a few years ago, and the Azure guide is based on work by the Green Software Foundation, which also covers some datacenter, front end and desktop optimization ideas including a Carbon Aware SDK. The GSF has published the Software Carbon Intensity (SCI) standard, which can be used to report carbon per user or per transaction in a consistent manner.

To get estimates of carbon footprint for optimization work, the open source cloud carbon footprint tool uses cloud billing data as its input to estimate energy usage (scope 2) and supply chain (scope 3) carbon footprint. For carbon audit reports, the cloud providers produce data that is more accurate, but isn’t detailed enough for optimization projects, and is delayed by months. Use the cloud provider reports to confirm that projects are having the expected long term effects.

InfoQ: Sustainability is an emerging area; what could it look like when it matures?

Cockcroft: In the next few years, all the major cloud vendors expect to reach 100% green energy for scope 2 globally via power purchase agreements, and the local power grids worldwide are rapidly transitioning to green energy, so scope 2 will become less material over time. Scope 3 will dominate, as it’s dependent on low carbon buildings, manufacturing processes and delivery mechanisms that are on much longer timescales.

The other area is measurement standardization, the ideal end point would be a common methodology, API and schema for high-resolution carbon instrumentation that all cloud vendors would support. Right now the instrumentation from each cloud provider is completely different and insufficient for tools vendors to build on.

About the Author

Rate this Article

Adoption
Style

BT