All you need to know about energy metrics in software engineering
Status:: 🟩
Links:: Energy Carbon Intensity Measure energy consumption of software
Metadata
Authors:: Cruz, Luís; de Bekker, Philippe
Title:: All you need to know about energy metrics in software engineering
Date:: 2023
URL:: http://luiscruz.github.io/2023/05/13/energy-units.html
DOI::
Cruz, L., & de Bekker, P. (2023). All you need to know about energy metrics in software engineering. Luís Cruz. http://luiscruz.github.io/2023/05/13/energy-units.html
Notes & Annotations
Color-coded highlighting system used for annotations
📝 Note (last modified: 2024-03-08#04:53:35) (
Blog post.
📑 Annotations (imported on 2024-03-11#18:55:17)
Energy is often referred to as work: for example, in electricity, energy is the work required to move charged particles. The International System of Units (SI) defines joule (J) as the standard unit of energy. It is also the most common unit of energy used in scientific literature. Another common unit is kilowatt-hour (kWh). For example, it is used to report household electricity consumption. Kilowatt-hour represents the exact same parameter as joule but in a much higher order of magnitude. Kilowatt-hours can be easily converted to/from joules as follows:
When measuring energy consumption, it is also common to talk about power consumption. Briefly, power represents the amount of work being done by a unit of time. For example, using standard SI units, 1 unit of power is equivalent to 1 joule per second. Instead of joules per second, we call it watts (W) in memory of the Scottish inventor James Watt.
Using power units instead of energy units is useful in particular scenarios. Imagine that we want to measure the energy consumption of reading a book on a device. Saying that reading a book spends 10J does not say much about its energy efficiency – 2/9 the user could be reading for 1 minute or 10 minutes. In those cases, it makes sense to talk about power consumption.
In a software project, energy consumption is usually the go-to parameter. We want to analyse the project by use case: for example, the energy consumption of applying a filter to a photo, uploading a file to the server, etc. Hence, as a rule of thumb, energy consumption is the parameter we should be reporting when testing energy in software projects. To compute energy consumption using power consumption, we need to factor in the duration of the execution.
Given the average power consumption (
Energy consumption (
Plot of power consumption over time. The area in gray is equivalent to the energy consumption between t=1st=1s and t=9st=9s.
The carbon intensity is the amount of carbon dioxide equivalent that is emitted per unit of energy consumed. It is commonly measured in
Note, carbon intensity can vary heavily due to several external factors. For example, the amount of