powerapi-ng / smartwatts-formula

SmartWatts is a formula for a self-adaptive software-defined power meter based on the PowerAPI framework.
BSD 3-Clause "New" or "Revised" License
28 stars 18 forks source link

Power estimations in excess of 1000 watts #26

Closed jack-leyland closed 1 year ago

jack-leyland commented 2 years ago

Thanks to authors for the work on this project.

For background, I am using smartwatts in combination with hwpc-sensor in an attempt to monitor the power consumption of relatively short jobs, with samples taken by the sensor at a 1ms frequency. Given the short intervals, I have been running smartwatts in post-mortem mode to avoid overwhelming the middleware given that the default interval is set to 0.5 seconds. The only modification I have made to both the sensor and the formula is making use of monotonic timestamps rather than wall-clock timestamps.

The results of several test runs have yielded many measurements for both my cgroup and the global estimation that exceed the tdp of my CPU (i7-4790 - 85W) by orders of magnitude, with some measurement exceeding 10,000 watts. I am trying to wrap my head around what factors could be contributing these kind of measurements and was hoping the authors could provide some insight.

Given the default window size being used in calibrating the model it does not seem that the issue is a lack of data, in my test runs roughly 7000 samples are gathered. Beyond this, I am curious if the sampling frequency being set so low is beyond the scope of what the model is able to handle and affecting the accuracy of the estimations?

From reading the study associated with the tool, I am also wondering if perhaps I am running hwpc-sensor for too short of a period, and subsequently not completing the "calibration phase" that is mentioned in the paper for arriving at a idle power comsumption metric used by the formula. However, as the sensor runs it is not clear when it completes the calibration phase.

Any insight into these issues would be greatly appreciated!

rouvoy commented 2 years ago

Your analysis is correct, the duration of the jobs is too short for the power model of SmartWatts to converge towards a correct calibration, hence mostly reporting erroneous estimations in the meantime :-/