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

Does this tool measure dynamic energy or total energy? #21

Closed khaleghzadeh closed 5 years ago

khaleghzadeh commented 5 years ago

Dear Developer,

I will appreciate it if you could clarify if the tool measures dynamic energy or total energy of components?

Regards, Hamidreza

TBunk commented 5 years ago

Hi Hamidreza,

I'm not sure if I get your question right. The tool allows to measure the energy consumption of different domains of Intel-processors. The individual domains are nicely explained here: https://blog.chih.me/read-cpu-power-with-RAPL.html. In addition to the domains explained in the link, it is also possible to measure the power of PSYS since the Skylake generation, which is stated to measure the energy consumption for the whole SoC. Note however, that this whole feature is specific to Intel-processors, i.e. any processor other than the ones from Intel will not work.

Our tool can then be used to dump the results to stdout. This is done either periodically by sending SIGUSR1 to it, or alternatively when the program terminates.

Does this answer your question?

Best regards, Thomas

khaleghzadeh commented 5 years ago

Dear Thomas,

Thanks for the comprehensive explanation.

Please note that I am hoping to know if the tool measures dynamic energy or total energy consumption. As you know, we have two types of power consumption in computing platforms: dynamic power, and static power. Static power is the amount of power consumed without an application execution. Dynamic power is defined as power consumed by a component to execute an application. For instance, consider a given platform with a static power of 10 W. If the average total power consumption of the platforms for executing an application is equal to 100 W, it can be concluded that the dynamic power consumption is equal to 90 W (= 100 - 10).

Regards, Hamidreza

TBunk commented 5 years ago

Hey Hamidreza,

according to your description, cpu-energy-meter provides the total power of the platform.

Generally, all that cpu-energy-meter does it to take the raw values from the CPU and report them to stdout afterwards. How these numbers are ultimately treated is then up to the user.

Best regards, Thomas

khaleghzadeh commented 5 years ago

Thomas,

Thanks for the clarification.

Regards, Hamidreza

PhilippWendler commented 5 years ago

Yes, CPU Energy Meter reports the measurement values from the CPU, which can be assumed to be the total energy according to your definition. Note, however, that only the CPU is included (except for the PSYS values), so any kind of energy consumption (static or dynamic) that results from other components (and from the losses in the PSU and voltage converters) is not measured.

khaleghzadeh commented 5 years ago

Philipp, Thanks for the update!

Regards, Hamidreza