HotCarbon 2026

Evaluating the Influence of Measurement Frequency on Energy Readings Using Intel RAPL and NVIDIA NVML

Maximilian Dauner (Munich University of Applied Sciences HM), Manuel Steinberg (Munich University of Applied Sciences HM), Andreas Brunnert (Munich University of Applied Sciences HM), Benedikt Schicker (Munich University of Applied Sciences HM), Benedikt Zönnchen (Munich University of Applied Sciences HM)

This transcript was made by AI. The open source speech recognition model Whisper (large-v3-turbo) transcribed the recording with faster-whisper. Names and technical terms were checked against the paper, but it can still contain mistakes. The recording is the reference.

0:00 The next presentation will be given by Maximilian Dauner from the University of Applied Sciences in Munich. He will talk about how to measure using RAPL and NVIDIA NVML. Okay. Hello, everyone. And first of all, thank you again for organizing that workshop and that really nice exchange with all the Master and PhD students and professors from all around. So my name is Maximilian Dauner. I'm a PhD student at the Munich University of Applied Science in the Munich Center for Digital Sciences and AI. And today, I'm going to present you our paper for this workshop where we evaluated the influence of measurement frequencies on the energy readings using Intel RAPL for CPU and NVIDIA NVML for GPUs. And my research background is actually focused on the prediction of turbulences of wind in urban areas, for example, energy optimal drone flight path planning. And in that field, you're starting to compare, for example, the computational costs of mathematical computational simulations with this generative approaches. And therefore, you're looking into, for example, the inference time, but also into how much CO2 could be saved using those AI models. But other than that, as you saw with all the presentations, people are using and measuring the energy consumptions, if they have, for example, local pipelines at the university, having maybe also consumer GPUs with only 24 gigabyte of VRAM where they could run local models.

1:47 I think over 90% of LLMs downloaded from Hugging Face are like small language models, which means they could run on those consumer GPUs. But in general, when looking of how this actually pipeline is looking then for those measurements, we have that setup where we have at the base some kind of hardware telemetry where we use, for example, NVML or RAPL for measuring the GPU and the CPU power and energy values. Or you could actually use physical sensors in the power plugs and measure how much the whole system you're having, including maybe cooling, all the storage and so on, is using. And then you have measurement frameworks building up on those libraries, CodeCarbon, Kepler, and so on. And then you do your experimental results, right? You test maybe different benchmarks, you have your reported energy, the power values, maybe the execution time, and then you create some kind of carbon reporting based on those evaluations, right? So what is the CO2 equivalent? What is the footprint?

2:53 And then you come up with some decisions you give to the university, for example, of how the next local setup should be, what kind of hardware to use, and what kind of energy optimization you could actually do, what kind of scheduler you use. And in the end, everything in this pipeline and everything we used in the most presentations is based on those hardware telemetry libraries. And if we have like an error in that fundamental base, this is propagated to all the other steps. So this is propagated until the last step where you actually do the decisions for your next system. So in the end, we could say, okay, now we have this variation of different settings we could we could use in those libraries, for example, what is the sampling interval we're using for getting the power and energy values. And we would imagine that if we use like finer and like higher frequencies, the results get better, right? We get more values, we get more detailed values. So in general, the results should get better.

3:55 But what we found is that on specifically on consumer GPUs, if we use those high frequent measurements, the NVML library is heavily underestimating the energy values by over 95% compared to the integrated power, which means like those high frequencies settings in consumer GPUs have like an erroneous energy reporting. So how did we get those numbers? We tested or we made one primary study, which relies on two hardware setups. We have this so-called server platform where two Nvidia A100 GPUs with 80 gigabytes of VRAM each is included. We have multiple Intel Xeon sockets as an operating system, we run NixOS. And then we're separately testing benchmarks for the CPU and GPU. We're using RAPL for measuring the power of the CPU and NVML for the GPU. And furthermore, we plugged in sensors in the power plug to actually measure the whole setup, like the whole emissions of that system, like the whole power used by the whole system. Then we compare this to the secondary primary research platform, which is like a typical desktop consumer use case where we have like an Nvidia RTX 4090 with only 24 gigabyte, but which is enough to run local models in a university setting, which runs Ubuntu. And once again, we use RAPL for the CPU and NVML for the GPU. And also in this setup, we have like a power

5:46 socket measuring the actual power from that whole system. And then we made like a supplementary test setup with like two additional GPUs, one GeForce RTX 5060, also a newer consumer GPU. We run through Vast.ai and then we had like a workstation GPU, which was locally available in the university. Our methods look like this, that we tested 14 different intervals from 0.5 milliseconds to 1 milliseconds. Then we go up in 10 millisecond steps from 10 milliseconds, 20 milliseconds and so on until 100. Then we tested 500 milliseconds for like coarser stability points and one second. And we used three different workloads from the NASA advanced supercomputing parallel benchmark set. So we used the lower upper Gauss-Seidel, which will be abbreviated as LU in the next slides, which is like a mixed compute and memory demand benchmark, which is inspired by CFD solvers. Then we have this embarrassingly parallel benchmark for compute bound and minimal communication and this conjugate gradient for irregularly memory access and sparse matrix operations. And we run each benchmark for each interval three times. We use like a 10 second warmup. Then where already the measuring begins, then the benchmark starts. Then after the benchmark is finished, we have like a 10 second cooldown. And afterwards we have like a three minute complete

7:22 cooldown before the next run starts. Each run is repeated three times for both workstations, which makes in our primary experiment set up 504 runs. And the supplemental research based on the other two GPUs only uses the LU benchmarks, but also 14 intervals and three repeats making it 84. So in total we have 588 controlled runs where we measure energy power, compare it and check the effect. So first we, of course, we have to look at what kind of interval frequency we requested and like what did we ask for and what did we actually achieve. And for a 0.5 millisecond request, so measuring inter, like measuring request, we get like 1.5 to 2 milliseconds across all three benchmarks, as you can see on the left for the for the consumer RTX 4090 GPU, and 10 to 11 millisecond update for the A100. So even though we requested this, and which is possible by those frameworks or libraries, we do not achieve those numbers. And if we look at the update step where the energy and power values are actually updated, we see that for the for the for the new cumulative energy, for example, we see that in general this changes for changes about like 10 milliseconds. And for the power, this is different between the A100 setup and the RTX,

8:59 and goes from 10 to 500. So this is what we actually are getting and how the values are actually updated. If we investigate the RAPL setup and look at the aggregate energy, we see that it's mostly stable if we have like 10 milliseconds and more of frequency updates. So if we are below, we have like an mean of 6.1 where it's like where the aggregate energy is like higher than our baseline values, and also the runtime is in 2.5 in mean longer than for for lower frequencies. This is for the RAPL reporting. And for NVML, we found heavy stale reads, which means like the update or like how often we read the same value from energy and power. So we see in that case that the that we have like repeated cumulative energy reportings for all those and for all those frequencies. And only at around 100 milliseconds, you can see that this repeating goes to zero. Before that, we have like 100% repeated readings for 0.5 and 80% for the A100 setup over all the three benchmarks. So you can see that for 100 milliseconds and one millisecond and up, you get like actually updates.

10:33 So what about now the estimations of the energy and power? What you can see here is the integrated power comparison with the energy. And you can actually see that the A100, therefore, is over all benchmarks, is close. If you read the energy cumulative and compare this to the integrated power, you get same values. But now if you take the consumer GPUs and compare the you compare the cumulative energy with the integrated power, you can see a huge underestimation of the energy on consumer coffee cards on all of the benchmarks. So in this case, if you would use like those frequencies of 0.5 or one millisecond, and you would rely on the energy values, you would heavily underestimate the actual power and energy consumed. And of course, we had those actual sensors in our power plugs. So we could actually make the baseline and see how much of our total system, the different GPU and CPU settings are counted to. And there you can see also how this measured energy on those consumer GPUs is heavily underestimated for those high frequencies. So you definitely get this wrong information out of this energy values on consumer GPUs. So in the end, what did we establish with our experiments? So we tested the cumulative energy values and found that this is strongly dependent on the requested interval

12:24 on our tested GPU setups, right? So we tested A100 GPUs, we tested different consumer and workstation GPUs. So this is not like an overall generalization of all the GPUs there are from all those different manufacturers. But in our test setup, we definitely found this heavily underestimation on consumer GPUs, whereas the A100 and the workstation GPU remain closely to the integrated NVML reported power.

12:55 We also found that repeated read or stale reads for those high frequencies across the GPUs. But what we not established with that research is why is this really happening? Is this because of the sensor on the GPU, is this like some kind of problem in the library itself? So this requires further research for the reason of this behavior. And it's also not generalizable of every driver of every setup, since we only have a limited number of GPUs and drivers tested in this research. So what is the main takeaway for this? So the main takeaway should be that before using all those libraries and without thinking of what kind of frequency should we use, what kind of setup should we use, what kind of GPUs we are measuring, we need first begin with a clear record of what kind of device, driver and requested interval we are using for our research. We should then definitely check what kind of achieved interval update period and stale readings do we get before we just randomly or blindly trust the values we get. We should cross-check definitely energy and power. Are those matching up? In the best case have like actual sensors inside of our power plugs to see if this overall baseline makes sense. We should validate with external references and then

14:20 report all those findings and not just the NCO2 equivalent. So the main key takeaway is that we have like separate time scales and we should definitely document and track them. Use inference specific evidence. So depending on what kind of GPU we have to actually check are those values correct? Do we get similar values from similar measurements? And validate them before actually reporting those numbers and making decisions based on that. So in that case thank you so much for listening to my presentation and I'm happy to answer questions or discuss this topic further. Thank you Maxi. Questions? Yeah. How well do you think the work generalizes to other environments where you'd actually use like mobile devices because there's a lot of work that goes into precisely measuring energy usage in those devices or accuracy? Yeah. So in general our findings and would be like or are in the current phase that like depending on if you have server class GPUs, A100, H100, those things we tested and we are currently testing which are not reported here in this research. There the energy values are correct as you could see but you still have the problem of the stale readings but somehow if this is not influencing your overall

16:01 difference between energy aggregated energy and integrated power. But for now all the consumer GPUs we have tested we found this behavior which means that we see the trend and if you have like select quality or like the class of the GPU you will find for different or not server specific areas this problem. So I could imagine that in other devices where even smaller GPUs are used you will find similar behavior. So these are currently our findings but again this is really not generalizable so we are not really knowing currently what is the problem of this. So is this a sensor problem, is this something with the I don't know library itself with the firmware. So it's hard to really say this is now for all GPUs of this or all devices of this class but in general for those things like consumer market and so on we all found the same behavior. I would have one question. So it's known that RAPL for example can be exploited as a side channel in the past so what until that they updated the firmware so now it's delivering inaccurate readings maybe some of them that you also discovered here. What's your take on probably taking that also to the Nvidia world? Might it be also possible that in the future we probably see a decline in accuracy for NVML if there's something like a similar

17:36 attack for GPUs? Yeah probably they will probably do the same changes or behave in the same way and even currently it's like not really like those values and how those values are specifically under specific workloads for example how the workload of the GPU is changing the results how the measurement frequency is changing the results. This is not really documented or published and a lot of experience and testing is needed so definitely there will be also this behavior I guess if there is this case also for GPUs in the future. Okay thank you. More questions then let's thank the speaker again. Thank you. Thank you so much.