Skip to content

Export Citation

        
          
@article{fieni-2024,
TITLE = {{PowerAPI: A Python framework for building software-defined power meters}},
AUTHOR = {Fieni, Guillaume and Acero, Daniel Romero and Rust, Pierre and Rouvoy, Romain},
URL = {https://hal.science/hal-04601379},
JOURNAL = {{Journal of Open Source Software}},
PUBLISHER = {{Open Journals}},
VOLUME = {9},
NUMBER = {98},
PAGES = {6670},
YEAR = {2024},
MONTH = Jun,
DOI = {10.21105/joss.06670},
KEYWORDS = {Power ; Energy ; Toolkit ; Measurement ; Framework},
PDF = {https://hal.science/hal-04601379/file/10.21105.joss.06670-3.pdf},
HAL_ID = {hal-04601379},
HAL_VERSION = {v1},
}
          
          
              
      

PowerAPI Overview

The goal of this project is to provide a set of tools to go forward a greener computing. The idea is to provide software-defined PowerMeters to mesure the power consumption of programs. The core of this project is the PowerAPI toolkit for building such PowerMeters.

Software PowerMeters

A software PowerMeter is an application built with the PowerAPI components that can measure the power consumption of software running on a single machine or on a cluster of machine.

The Figure below depicts the global architecture of a software PowerMeter in PowerAPI.

PowerAPI Architecture Overview

A PowerMeter has two components, a Sensor and a Formula, used to produce an estimation of the power consumption of a monitored software.

Sensor

The Sensor is an independent software that collects raw data (metrics) correlated with the power consumption of the monitored software.

Data are collected by querying the hardware’s machine that hosts the monitored software. The sensor must be executed on the same machine as the monitored software. The data are collected throughout the duration of the software. For this reason, the sensor must operate in parallel.

Collected raw data are stored in an external Source to make the data available to the Formula. This Source may be hosted on an other machine.

Usage

Currently, PowerAPI proposes one Sensor: HWPC. Refer to the Sensor documentation to know how to use it.

Formula

A Formula is a computational module that computes an estimation of the power consumption of monitored software from the data collected by the sensor.

A Formula has two working modes:

  • stream mode where the Formula read the data from the Sensor as they are produced (in realtime).

  • post-mortem mode where the Formula analyses the data already collected by the Sensor in a past monitoring phase.

Usage

Currently, there is one Formula: SmartWatts. Refer to the Formula documentation to know how to use it.