Energy counter overflow

97 views
Skip to first unread message

Yunqi Zhang

unread,
Mar 30, 2013, 7:56:20 PM3/30/13
to likwid...@googlegroups.com
Hi all,

I think this is a really helpful project for me. But I find it very inconvenient since the energy counters overflows a lot, so I am planning to patch it. Could anyone tell me which part of the code actually causes the overflow and which msr register file reading is the PWR_PKG_ENERGY used to calculate the power consumption?

Thank you very much!

Yunqi

Yunqi Zhang

unread,
Mar 30, 2013, 9:02:26 PM3/30/13
to likwid...@googlegroups.com
Never mind. I believe I've found the answer. :)

moebiusband

unread,
Mar 31, 2013, 9:31:01 AM3/31/13
to likwid...@googlegroups.com
Hi,

you are perfectly right, the overflow issue has to be solved in likwid. It does especially hurt with the RAPL counters as they are read only, so I cannot zero them before a measurement. Thank for you patch!

Jan

Yunqi Zhang

unread,
Apr 3, 2013, 3:32:28 PM4/3/13
to likwid...@googlegroups.com
Hi Jan,

Technically, the patch I posted is not a really good one. It only works for the measurement that lasts not too long (long enough for more than 1 overflow occurs), and it is hard to tell whether the numbers are right because it won't generate crazy numbers which could be helpful to detect overflow. It works for me because my workloads are typically around 10 minutes.

I think one way to do this perfectly is to read the msr file every certain period of time, which is not long enough for an overflow, and accumulates the numbers to get the total energy consumption.

Thanks!

Yunqi
Reply all
Reply to author
Forward
0 new messages