Hey all,

I tried to look at the power consumption numbers as reported by perf today. I 
found https://lwn.net/Articles/573602/ and used this locally:

 perf stat -a -e power/energy-pkg/,power/energy-cores/,power/energy-
gpu/,power/energy-ram/ -I 1000 sleep 1000
#           time             counts   unit events
     1.000124684               2.36 Joules power/energy-pkg/          
(100.00%)
     1.000124684               0.21 Joules power/energy-cores/        
(100.00%)
     1.000124684               0.00 Joules power/energy-gpu/          
(100.00%)
     1.000124684               1.17 Joules power/energy-ram/        
     2.000292827               2.32 Joules power/energy-pkg/        
     2.000292827               0.18 Joules power/energy-cores/      
     2.000292827               0.00 Joules power/energy-gpu/        
     2.000292827               1.16 Joules power/energy-ram/        

The LWN article says: 
- power/energy-cores: power consumption of all cores on socket
- power/energy-pkg  : power consumption of all cores + LLC cache

Does this mean that the total power consumption can be all of the numbers 
above summed up, excluding the power/energy-cores value? For the above, that 
gives me roughly 3.5 J. Now how to get the Watt value? My naive assumption 
would be 3.5W, as I'm sampling over one second. The LWN article says:

W = C * 2.3 / (1e10 * time)

This equation is only valid when reading the values directly, right? But when 
I compare the Watt value obtained with my naive approach above it is much 
lower than the value reported by powertop. I assume it's because no values are 
obtained for the display and other hardware? Is that correct?

Thanks
-- 
Milian Wolff
[email protected]
http://milianw.de

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to