METRION: A Framework for Accurate Software Energy Measurement
Benjamin Weigell, Simon Hornung, Bernhard Bauer
TL;DR
<3-5 sentence high-level summary> The paper tackles the challenge of accurately attributing energy consumption of software applications to underlying hardware components in complex CPU/memory architectures. It introduces the Energy Attribution Model (EAM) and the METRION framework, a platform-agnostic system that uses hardware performance counters and on-device sensors to distribute CPU and DRAM energy to per-thread activity, accounting for multi-socket NUMA topology, SMT, and frequency scaling. The authors implement an initial Linux/Intel extension and validate the approach across three workloads, achieving CPU energy attribution with about 4.2% MAPE for CPU-focused workloads and 16.1% MAPE for DRAM-focused workloads, while noting higher DRAM attribution errors in some cases and a notable runtime overhead. The work lays a foundation for cross-platform, fine-grained energy optimization and provides a path toward more accurate energy-aware software engineering and infrastructure management.
Abstract
The Information and Communication Technology sector accounted for approximately 1.4% of global greenhouse gas emissions and 4% of the world's electricity consumption in 2020, with both expected to rise. To reduce this environmental impact, optimization strategies are employed to reduce energy consumption at the IT infrastructure and application levels. However, effective optimization requires, firstly, the identification of major energy consumers and, secondly, the ability to quantify whether an optimization has achieved the intended energy savings. Accurate determination of application-level energy consumption is thus essential. Therefore, we introduce an energy attribution model that quantifies the energy consumption of applications on CPU and DRAM at the thread level, considering the influence of Simultaneous Multithreading, frequency scaling, multi-socket architectures, and Non-Uniform Memory Access. To ensure cross-platform applicability, we integrate the proposed model into an extensible framework, METRION, including a platform-independent data model and an initial implementation for Linux systems using Intel CPUs. We evaluate METRION across three different workloads and demonstrate that the energy attribution model can accurately capture the CPU energy consumption of applications targeting solely the CPU with a Mean Absolute Percentage Error of 4.2%, and the DRAM energy consumption of applications targeting DRAM with an 16.1% error.
