Decarbonizing Software: How CAST applied the SCI Metric to Make a Difference

Posted on March 27th, 2024

CAST is a leader in software intelligence. Their compelling use case demonstrates how targeted technological interventions can deliver substantial reductions in carbon emissions.

Decarbonizing Software: How CAST applied the SCI Metric to Make a Difference

In the battle against climate change, the tech industry's carbon footprint has emerged as a silent yet significant contributor to global emissions. This challenge is sparking innovative approaches to decarbonizing software. 

Using CAST Highlight and the SCI Specification, CAST demonstrates that decarbonizing a single software application can potentially reduce annual CO2 emissions by an estimated 400 kg—a testament to the tangible impact of green software practices. The optimized version of the application also showed a 5% improvement in execution duration compared to its original state.

The Challenge: Measuring and Reducing the Carbon Footprint of Software

CAST started with an internal audit of its carbon footprint, motivated by the emerging requirements for ESG reporting. The findings were eye-opening, revealing that a significant portion of their emissions stemmed from the technology assets powering their software solutions. This discovery led to a commitment to reduce their carbon footprint and empower their clients to do the same.

CAST needed a method to accurately measure their Green Impact—quantifying the CO2 emissions generated by their applications. Beyond measurement, CAST aimed to develop actionable insights to reduce carbon emissions and integrate them into a model they could replicate across their product suite. CAST chose an approach that contributed to its sustainability goals and could benefit clients, providing a valuable capability to assess and enhance the environmental impact of their application portfolios.

The Innovative Solution: CAST Highlight and SCI 

CAST Highlight assesses various aspects of software, including technical debt, cloud maturity, software composition, and environmental impact. The introduction of Green Software Insights within CAST Highlight supported our collective mission to quantify and reduce the carbon emissions associated with software applications.

The SCI specification offers a method for calculating the rate of carbon emissions for software applications, providing a standardized metric to reach a baseline measure of emissions from a software application. Integrating the SCI specification with CAST Highlight allowed CAST to measure the carbon footprint of software and identify specific areas within the application code that contributed most significantly to its emissions output.

At first, CAST ran CAST Highlight to thoroughly analyze one of its enterprise applications, creating a performance baseline that captured the execution duration of key functions. This baseline became a critical reference point to pinpoint green deficiencies within the application's code.

Armed with this insight, CAST started a targeted optimization campaign. Leveraging the detailed recommendations provided by CAST Highlight, the team addressed its green deficiencies, focusing on modifications that would yield the most reduction in CO2 emissions. Following those adjustments, CAST compared the optimized version of the application against the original baseline to quantify the improvements achieved.

The Results: A Leap Towards Sustainability

Using CAST Highlight with the SCI specification resulted in an optimized version of the application, demonstrating a 5% improvement in execution duration compared to its original state. This enhancement, achieved with just four person-days of effort, proves the efficiency and effectiveness of targeted green optimizations.

The reduction in execution time is a modest achievement compared to the potential environmental impact yield: the application’s optimization could lead to an annual reduction of over 400kg in CO2 emissions if all green deficiencies were fixed. When extrapolated to the broader suite of applications managed by CAST and its clients, the cumulative effect on carbon footprint reduction appears monumental.

Furthermore, the energy consumption associated with running the optimized application also significantly decreased, with over 1,000 kWh potentially saved each year. This case clearly demonstrates how business decisions rooted in greening software can subsequently support capital efficiency.

Decarbonizing Software Up-close: Technical Details of the Case Study

1) Components and Architecture

The following components constitute the architecture of the case study:

  • Desktop Client App - Locally installed end-user application used for analyzing local files and producing results of the analysis to be uploaded to the SaaS application for visualization. Primarily developed in JavaScript and Node.js.

  • Portal - Web-based user interface for browsing reports and dashboards summarizing the analysis results. Running on Linux and developed using SpringBoot, JEE, Hibernate, Spring Security, Jersey.

  • Database - PostgreSQL database used to build the reports and dashboards.

  • Storage - Cloud-based storage that hosts the Desktop Client App installer.

  • CVEDB - Reference database used by some reports updated from the National Vulnerability Database via API. Developed in Java and SpringBoot.

  • Knowledgebase - Proprietary metadata database used by some reports and dashboards. Developed in Java, NoSQL, and PostgreSQL.

Download the Green Impact Case Study

2) Procedure

The following process was aimed at the source code of the application to identify green deficiencies (inefficient code patterns) and replace them with alternate, more efficient code. As a result, CAST fixed ten green deficiencies.

(What) Software boundary

  • Portal

  • Database

(Scale) Functional unit

  • The selected functional unit is a stress-testing scenario representing a typical day of software operations.

  • The scenario comprises roughly 10,000 API endpoint invocations, accessing an anonymized copy of production data.

  • The invoked API endpoints relate to functional content access (all aspects of CRUD), computation triggering, and report generation.

  • The scenario could then be played 100s of times.

  • The choice of functional unit applies to all components in the software boundary.

(How) Quantification method

  • The focus of the study is to measure real-world impacts on the duration of the functional unit scenario.

  • Measurement was performed in isolation using dedicated hardware resources in the cloud.

  • No reliable/available metric except duration (CSP own carbon estimation model would only care about the hardware being up-and-running or not).

  • Aside from the goal of developing a model to estimate potential CO2 emissions savings, what would matter for the measured software is to support growing user activity without requiring a hardware upgrade, which would cause a larger environmental footprint.

(Quantify) SCI Value Calculation

  • The SCI formula provides a framework to turn duration reduction into CO2 emissions savings.

  • Duration impacts the SCI results in two places.

  • O, via the E factor, as the E for the measured software, would stop requiring energy when all its operations are done.

  • M, via the TiR factor as the measured software, would allow the use of resources for other software when all its operations are done.

(Report)

  • Computed duration reduction as a percentage difference between the average duration of 200+ runs of the functional unit scenario using the software before and the average duration of 200+ runs of the functional unit scenario after its "decarbonizing".

  • Applied duration reduction percentage to both E and TiR in the SCI formula.

  • Regarding O

  • Baseline E comes from hardware manufacturer specifications.

  • I comes from outworldindata

  • Regarding M

  • TE comes for hardware manufacturer specifications.

  • EL has a default 4-year lifespan.

  • RR/ToR is 3 as this software relies on development, integration, and production environments.

Beyond a Single Application: Scaling Impact

CAST’s application of the SCI specification offers a blueprint for action. It invites software developers and companies to reassess their applications through the lens of carbon emissions, armed with the technologies and methodologies to make meaningful change. 

For those inspired by CAST's journey and on a path to decarbonize software, begin assessing your software's impact and explore how market tools, when integrated with the  SCI specification, can enhance your optimization efforts. 

To learn how to apply the SCI specification, view the SCI Guide

This article is licenced under Creative Commons (CC BY 4.0)