pyRAPL icon indicating copy to clipboard operation
pyRAPL copied to clipboard

DRAM consumption output

Open hassenebyy opened this issue 2 years ago • 1 comments

Hi everyone,

I've noticed that the DRAM output is expressed in seconds. "dram (Optional[List[float]]) – list of the RAM energy consumption -expressed in seconds- (one value for each socket) if None, no RAM energy consumption was recorded."

Can you explain why the energy consumption is not expressed in micro-Joules ? Otherwise, how can I obtain the equivalence in Joules ?

Thank you, Best regards.

hassenebyy avatar Jul 06 '21 11:07 hassenebyy

I take advantage of this issue to add that the return in seconds seems strange to me. Indeed, I get results such as [9643.0], [12817.0] for a code that runs in 0.4 seconds

Here is the code

import pyRAPL
pyRAPL.setup()

baz = pyRAPL.Measurement("baz")
baz.begin()
list(range(10000))
baz.end()
print(baz.result.dram)
# [12024.0]

av1m avatar Aug 12 '22 10:08 av1m

In the class DramAPI, the file read is energy_uj same name as the one in PkgAPI, guessing that it means energy in micro joule.

smenard avatar Nov 08 '22 14:11 smenard

I would also say, that there is an error in the documentation. The average power that 8gb of RAM require is approx 3W (as a rule of thumb). I ran pyRAPL on just my system for 10 minutes and recorded the energy usage per second into a file.

The results show, that my RAM (of which 0.96GB were allocated at that time) would consume 2063.622961J which corresponds to a power demand of approx 3.439371W. This would somewhat approve the assumption of the output being displayed in micro Joules for the RAM as well.

Andlexex avatar Sep 23 '23 18:09 Andlexex