Fine-Grain Energy Consumption Modeling of HPC Task-Based Programs

Jules Risse, Amina Guermouche, François TrahayCLUSTER 2025

Abstract

Modern supercomputers consume massive amounts of power, often exceeding 30 Megawatts. To improve efficiency, developers require fine-grained insights into the energy consumption of individual software tasks. However, a significant "granularity mismatch" exists between hardware power meters and high-performance computing (HPC) tasks. This paper describes a post-mortem regression approach integrated into the StarPU runtime system that correlates execution traces with coarse hardware power readings to estimate the energy cost of millisecond-scale tasks with high accuracy.

Introduction: The Granularity Mismatch

As the world's fastest systems reach exascale levels, energy efficiency has become a primary design constraint. Developers need to identify which specific code segments are most energy-intensive. Current hardware power meters, such as Intel’s RAPL or NVIDIA’s NVML, typically provide updates every 20 to 100 milliseconds and measure consumption at the level of an entire CPU socket or GPU package.

Hierarchy of hardware power domains typically monitored by RAPL, illustrating the challenge of isolating individual core energy.

In contrast, modern HPC tasks often execute in just 1 to 2 milliseconds. This discrepancy makes it impossible to directly measure the energy of a single task. Traditional workarounds, such as running a task thousands of times in isolation, are impractical for complex, real-world applications.

Methodology: Post-Mortem Regression

The proposed solution utilizes a three-step workflow integrated into the StarPU runtime system:

  1. Tracing & Sampling: During a single application run, the system logs the activity of every worker (CPU core or GPU) using the FxT tracing library. Simultaneously, total hardware energy consumption is sampled at regular intervals (e.g., every 50ms).
  2. Linear System Construction: The execution is divided into time windows. For each window, the total energy spent ($\delta_i$) is known, as is the duration spent on each specific task type (e.g., matrix multiplication, data transfer). This forms an overdetermined linear equation: Total Energy = (Time in Task A × Power of A) + (Time in Task B × Power of B) + ...
  3. Ridge Regression: To solve this system, the authors employ Ridge Regression. This regularized least-squares method is essential because many tasks occur simultaneously or exhibit similar patterns (multicollinearity), which can cause standard solvers to produce non-physical results like negative power values.
Timeline of worker activity synchronized with discrete energy sampling events (E1-E4) to build the linear regression model.

Key Insights and Results

The method was evaluated across multiple HPC clusters (Intel Xeon, AMD EPYC, NVIDIA A100, AMD MI210) using dense and sparse linear algebra workloads.

Accuracy and Overhead

On CPUs, the model proved remarkably accurate, achieving a Mean Average Percentage Error (MAPE) between 0.5% and 5%. Accuracy on GPUs was lower (10% to 28%), primarily due to the lower update frequency and internal sampling limitations of GPU power counters. Crucially, the overhead for collecting this data was negligible, typically staying below 2%.

The "Spinning" Worker Discovery

A significant finding was the high power consumption of the "Sleeping" state in StarPU. The model revealed that workers waiting for tasks still consume substantial power because they are "spinning" on condition variables rather than entering deep low-power states.

Model Reusability

The research demonstrated that a power model generated from one execution can accurately predict energy consumption for different runs of the same program, even under different scheduling policies. This allows developers to "train" a model once and apply it to optimize future production runs.

Conclusion and Future Work

This regression-based approach provides a viable path toward fine-grained energy accounting in HPC without specialized hardware. Future work will focus on improving GPU modeling through external physical wattmeters and incorporating dynamic frequency scaling into the regression model. The ultimate goal is to enable energy-aware scheduling, where the runtime system automatically selects the most efficient worker for any given task in real-time.

Summary updated

BibTeX
@inproceedings{risse2025fine,
  author = {Jules Risse and Amina Guermouche and François Trahay},
  title = {{Fine-Grain Energy Consumption Modeling of HPC Task-Based Programs}},
  booktitle = {CLUSTER},
  year = {2025},
  doi = {10.1109/cluster59342.2025.11186478},
}
Figure