sosy-lab / cpu-energy-meter

A tool for measuring energy consumption of Intel CPUs
BSD 3-Clause "New" or "Revised" License
321 stars 29 forks source link

Support new "platform" domain of Skylake desktop CPUs #16

Closed PhilippWendler closed 6 years ago

PhilippWendler commented 7 years ago

Systems with a Skylake client CPU may optionally have a new domain called "platform" or "PSYS" (register MSR_PLATFORM_ENERGY_COUNTER at 0x64d according to Intel Software Devlopers Manual Volume 3C, Table 35-37. We should support measuring this value where present.

TBunk commented 6 years ago

@PhilippWendler I just implemented this feature in commit 72c2bacd5366e1ae7c8881b925789bfee30da061; could you have a look on that?

PhilippWendler commented 6 years ago

It works on my laptop:

cpu_count=1
duration_seconds=2.185360
cpu0_package_joules=7.782410
cpu0_core_joules=1.420654
cpu0_uncore_joules=2.379089
cpu0_dram_joules=4.834167
cpu0_psys_joules=37.189209

This would mean a power consumption of 17W in these two seconds, which is plausible. Nice!

PhilippWendler commented 6 years ago

@TBunk Has something changed in the calculation since this issue was closed? Now I get much lower values for PSYS.