PMT Power Measurement Toolkit Stefano Corda1 Bram Veenboer2 Emma Tolley1 1EPFL Ecole Polytechnique F ederale de Lausanne2ASTRON Netherlands Institute for Radio Astronomy

2025-05-02 0 0 690.93KB 3 页 10玖币
侵权投诉
PMT: Power Measurement Toolkit
Stefano Corda1, Bram Veenboer2, Emma Tolley1
1EPFL ´
Ecole Polytechnique F´
ed´
erale de Lausanne, 2ASTRON Netherlands Institute for Radio Astronomy
stefano.corda@epfl.ch, veenboer@astron.nl, emma.tolley@epfl.ch
Abstract—Efficient use of energy is essential for today’s super-
computing systems, as energy cost is generally a major compo-
nent of their operational cost. Research into “green computing”
is needed to reduce the environmental impact of running these
systems. As such, several scientific communities are evaluating the
trade-off between time-to-solution and energy-to-solution. While
the runtime of an application is typically easy to measure, power
consumption is not.
Therefore, we present the Power Measurement Toolkit (PMT),
a high-level software library capable of collecting power con-
sumption measurements on various hardware. The library pro-
vides a standard interface to easily measure the energy use of
devices such as CPUs and GPUs in critical application sections.
Index Terms—CPU, Efficiency, GPU, HPC, Performance
I. INTRODUCTION
Contemporary scientific applications such as particle hy-
drodynamics [1], radio-astronomical imaging [2] and Earth
digital twin simulation [3] have demanding compute require-
ments, in the order of the ExaFlops or more. Moreover, top
supercomputers [4] aim to reach Zettascale [5] performance
in the current decade. To achieve this goal, increasingly
more powerful hardware is used. However, due to the end
of Dennard’s Scaling law, these advances in compute power
come at the cost of a higher power consumption [6].
Energy efficiency is a critical challenge in HPC (High-
Performance Computing) as data centers are struggling to
operate within stringent power budgets [7] and also try to
reduce their carbon footprint [8]. Therefore, it is crucial
to monitor the power consumption of HPC applications in
order to evaluate trade-offs between achieved performance and
energy efficiency [9].
In this context, we present the Power Measurement Toolkit
(PMT), a lightweight high-level library capable of collecting
power measurements on various architectures, such as CPUs
and GPUs. PMT can easily be used to probe specific appli-
cation regions to measure power consumption and evaluate
energy efficiency.
II. POWER MEASUREMENT TOOLKIT
PMT’s structure is reported in Fig. 1. The library is written
in C++ and is Linux-only; it interfaces with hardware vendors’
API to collect power consumption. More precisely, for GPUs
it uses NVML [10] for NVIDIA and rocm-smi [11] for AMD.
CPUs are monitored through the RAPL (Running Average
Power Limit) [12] interface, or through LIKWID [13]. PMT
can profile other architectures, such as Xilinx FPGAs, and
it can be easily extended to support new vendors’ hardware.
Some other architectures expose their power usage information
through files in sysfs (the /sys folder). PMT also has an
interface to physical power sensors such as PowerSensor2 [14].
Power Measurement Toolkit (PMT) NVML
ROCM
RAPL
...
Python Bindings
Python Decorators
Arduino
Fig. 1. Power Measurement Toolkit structure: the library interfaces with
different power measurement back ends. The library also includes Python
bindings and decorators to ease the measurement for application users.
PMT library’s core consists of a background thread to
the profiled application that communicates and gathers power
consumption information from the selected back end, such
as NVML. PMT sampling frequency is dependent on the
hardware and back end. For instance, NVML is able to sustain
up to 10 ms and RAPL up to 500 ms.
PMT can be installed using CMake or a Spack [15], [16]
recipe [17]. The library works in two modes: 1) dump-mode
and 2) measurement-mode. The first one writes into a file
timestamps and power measurements to be able to examine
the power consumption over time of an application. The
second one simply provides the profiled code’s average power
consumption for quick energy-efficiency estimations.
PMT can be integrated into C++ and Python applications.
In C++ the code must be instrumented as shown in Listing 1.
Using PMT in a C++ application is a three-step process:
1) include the PMT header; 2) initialize PMT; 3) surround
the region of interest with PMT activation and deactivation
function calls. This can be done similarly in Python by using
Python bindings. However, we provide a simpler interface
using Python decorators (see Listing 2). As shown in Listing 2,
the Python code only requires an import statement of the
PMT library. In the case mentioned, we are collecting the
measurement by using the NVML back end for NVIDIA
GPUs and RAPL for AMD CPUs. The library support multiple
decorators at the same time (see Listing 2).
Typically, PMT has a small overhead in the order of 1 ms in
C++ and 10 ms in Python. This overhead is cumulative when
multiple decorators are used.
The Listings 1 and 2shows the above-mentioned
measurement-mode and how to programmatically query
the measurement after the region of interest. Some changes
are needed to activate the dump-mode. In Python, we just
need to rename the decorator with dump. Similarly, in C++,
arXiv:2210.03724v2 [cs.PF] 7 Nov 2022
摘要:

PMT:PowerMeasurementToolkitStefanoCorda1,BramVeenboer2,EmmaTolley11EPFL´EcolePolytechniqueF´ed´eraledeLausanne,2ASTRONNetherlandsInstituteforRadioAstronomystefano.corda@ep.ch,veenboer@astron.nl,emma.tolley@ep.chAbstract—Efcientuseofenergyisessentialfortoday'ssuper-computingsystems,asenergycostisg...

展开>> 收起<<
PMT Power Measurement Toolkit Stefano Corda1 Bram Veenboer2 Emma Tolley1 1EPFL Ecole Polytechnique F ederale de Lausanne2ASTRON Netherlands Institute for Radio Astronomy.pdf

共3页,预览1页

还剩页未读, 继续阅读

声明:本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。玖贝云文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知玖贝云文库,我们立即给予删除!
分类:图书资源 价格:10玖币 属性:3 页 大小:690.93KB 格式:PDF 时间:2025-05-02

开通VIP享超值会员特权

  • 多端同步记录
  • 高速下载文档
  • 免费文档工具
  • 分享文档赚钱
  • 每日登录抽奖
  • 优质衍生服务
/ 3
客服
关注