Measure energy consumption of software

Why?

You can't improve what you don't measure!

Measuring vs. Estimating

Measuring of the actual energy consumption with real data from a power monitoring source is not always possible and in fact quite complex. For instance, if your software runs in the cloud, you don't have access to real time energy consumption data. However, it is possible to estimate the energy consumption by using a model.

This note gives an overview about all techniques I'm aware of on how to retrieve the energy consumption of software. Different software environment impact models are discussed in the following note: Estimate energy consumption of web and cloud-based software with models

Proxy Metrics

If you just want to improve the energy efficiency of your software but don't want to or are not able to gather data about energy consumption, the usage of proxy metrics may be sufficient and is a lot easier to retrieve: Using proxy metrics for improving energy efficiency of software

Wikipedia
Best Practices
Green Software Measurement Model (GSMM)

Overview of Tools

Diagram by Tim Schade

|1000

Created by Tim Schade, source: https://github.com/schaDev/GreenCoding-measuring-tools

Overview studies

Jay et al. (2023). An experimental comparison of software-based power meters

Software-based black-box measurements

How to measure the energy consumption of software as a black-box depends on how your software is running.

Local software application

Desktop

Measure energy consumption of desktop software applications

Mobile

Measure energy consumption of mobile software applications

Client-server application (remote processing application)

Calculate carbon emissions of websites, web applications & digital services

Server service

AI models

Estimate ecological footprint of AI models

Software-based measurements during software development

Measure energy consumption of software in CI pipelines

Software-based source code level measurements

Measure energy consumption at source code level

Hardware-based measurements

Hardware-based power measurement