Measure energy consumption of software
You can't improve what you don't measure!
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
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
Overview by Wikipedia:
Run-time estimation of system and sub-system level power consumption
Overview of Tools
Diagram by Tim Schade
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.
Software classification by GrΓΆger et al. (2018):
- Local software application
- Remote data storage application
- Remote processing application
- Server service
Local software application
Measure energy consumption of local software applications
Remote data storage application & remote processing application
Calculate carbon emissions of websites, web applications & digital services
Server service
- Measure energy consumption of server-side applications and cloud-based systems
- Estimate energy consumption of web and cloud-based software with models
- Estimate carbon emissions of cloud applications
- Monitoring of software energy consumption
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