Green software metrics

Status:: 🟩
Links:: climatiq @Guldner.etal.2024.DevelopmentEvaluationReference Software Carbon Intensity Specification Estimate carbon emissions of cloud applications

Metadata

Authors:: Brunnert, Andreas
Title:: Green software metrics
Date:: 2024
Publisher:: Association for Computing Machinery
URL:: https://doi.org/10.1145/3629527.3652883
DOI:: 10.1145/3629527.3652883

Notes & Annotations

Color-coded highlighting system used for annotations

📑 Annotations (imported on 2024-06-27#10:11:23)

brunnert.2024.greensoftwaremetrics (pg. 1)

Just looking at the price differences for the same runtime environment on a cloud environment when choosing different payment options (e.g., up-front or on-demand) shows that there is no direct correlation between price and resource use.

brunnert.2024.greensoftwaremetrics (pg. 1)

The SCI specification combines the carbon emissions of all components and transactions of a software system into a single rate value. The advantage of this approach is the simplicity of the result but it makes it difficult to understand the carbon emissions of specific transactions or components of a system.

brunnert.2024.greensoftwaremetrics (pg. 1)

As an alternative approach, the Green Software Measurement Model (GSMM) [4] attempts to describe a reference model for assessing the resource and energy efficiency of software products and components. GSMM focuses mainly on the individual components of a software system, without considering their interrelationships while processing individual units of work (e.g., transactions). Therefore, the authors [4] also note that the current GSMM methods are not fully applicable to complex architectures or distributed systems.

brunnert.2024.greensoftwaremetrics (pg. 1)

Measuring or calculating [6] the resource demands (i.e., CPU, memory, storage, network) of software systems is common in the software performance engineering community, as such data is required for capacity planning and performance modeling techniques. We propose to use the same data to quantify the emissions of a software system on a given runtime environment.

brunnert.2024.greensoftwaremetrics (image) (pg. 2)

Figure 2: Calculating Carbon Emissions per Transaction

brunnert.2024.greensoftwaremetrics (pg. 2)

Resource profiles contain resource demands for the following resource types: CPU (dCPU ), storage (differentiated by read dSTOr and write dSTOw operations), memory (dMEM ), and network (differentiated by incoming dNETi and outgoing dNETo traffic).

brunnert.2024.greensoftwaremetrics (pg. 2)

For this calculation we need to be able to quantify the carbon emissions (c) of the different resource types (CPU: cCPU ,storage: cSTO , memory: cMEM , network: cNET ) in the same unit as the resource demand is stored in the vector. For CPU, we need to know how much carbon is emitted when a core is running at a certain utilisation level; for memory, the carbon emissions for a given size (e.g., GB); and for storage and network, how much carbon is emitted when a given amount of data is processed.

brunnert.2024.greensoftwaremetrics (image) (pg. 2)

Figure 3: Prototype Architecture

brunnert.2024.greensoftwaremetrics (pg. 2)

We are using OpenTelemetry3 as a standard for transferring the required metrics from the application and climatiq to Prometheus4 as a time series database. We need to store both sets of data (resource demand and emission data) correlated by time as emissions vary over time depending on the amount of green energy used to power the runtime environment (e.g., lack of solar power at night). Grafana5 is used to visualize the results of this calculation to show the carbon emissions per transaction as well as per server, container, or virtual machine involved in processing a transaction over time.