Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
New Contributor I
61 Views

RAPL analysis/tests on a laptop

Jump to solution

Hi,

I am testing the RAPL feature a laptop in a way to try to read some CPU consumption values and I need someone to help me getting some answers. Well, I am running a RAPL sample code simultaneously with a total battery power consumption code and I am getting the following values:

##RAPL:

Package energy before: 5743.516907J
PowerPlane0 (core) for core 0 energy before: 2655.314636J
PowerPlane0 (core) for core 0 policy: 0
PowerPlane1 (on-core GPU if avail) before: 1199.609863J
PowerPlane1 (on-core GPU if avail) 0 policy: 16
DRAM energy before: 33766.502869J

Sleeping 1 second

Package energy after: 5747.005737  (3.488831J consumed)
PowerPlane0 (core) for core 0 energy after: 2655.366577  (0.051941J consumed)
PowerPlane1 (on-core GPU if avail) after: 1199.689941  (0.080078J consumed)
DRAM energy after: 33767.247131  (0.744263J consumed)

##Total battery power consumption: 8 watts average

I suppose that Package energy is the CPU total energy without DRAM energy right? (PKG=uncore+cpu+gpu)

The laptop I'm using have a Haswell CPU (Thinkpad lenovo L440 - Intel core i5 4200m, 8GB RAM).

If so is true, 0,74W (DRAM) + 3,49W (PKG) = 4,23W... Is it normal that the rest(without CPU and RAM) of the laptop is consuming 3,77W? Or am I doing some wrong maths about these values?

Regards,

Carlos Portela

0 Kudos

Accepted Solutions
Highlighted
61 Views

Hello Carlos,

Yes it is normal for there to be a difference between the package power usage and the battery discharge rate. Most of this difference is (usually) the display. This is one reason for keeping the brightness level lower.

I have a tool (IPPET) which does something similar to what you are doing. See https://software.intel.com/en-us/forums/topic/518161 . I'll have an update to the tool in about a month (hopefully) adding support for linux, mac, android, C-state residencies, more charts overtime, disk & network bandwidth, and other stuff.

Pat

View solution in original post

0 Kudos
17 Replies
Highlighted
62 Views

Hello Carlos,

Yes it is normal for there to be a difference between the package power usage and the battery discharge rate. Most of this difference is (usually) the display. This is one reason for keeping the brightness level lower.

I have a tool (IPPET) which does something similar to what you are doing. See https://software.intel.com/en-us/forums/topic/518161 . I'll have an update to the tool in about a month (hopefully) adding support for linux, mac, android, C-state residencies, more charts overtime, disk & network bandwidth, and other stuff.

Pat

View solution in original post

0 Kudos
Highlighted
New Contributor I
61 Views

Patrick Fay (Intel) wrote:

Hello Carlos,

Yes it is normal for there to be a difference between the package power usage and the battery discharge rate. Most of this difference is (usually) the display. This is one reason for keeping the brightness level lower.

I have a tool (IPPET) which does something similar to what you are doing. See https://software.intel.com/en-us/forums/topic/518161 . I'll have an update to the tool in about a month (hopefully) adding support for linux, mac, android, C-state residencies, more charts overtime, disk & network bandwidth, and other stuff.

Pat

Hi,

Just saw the tool and seems to be interesting for the tests I'm doing. I will try it out when you release a linux version! Is there anyway to get the disk and network card consumption at the moment? Similar solutions to RAPL?

About the consumption on my laptop, I'm using an external LCD screen connected to the laptop, should it consume that much anyway?

You said yes about the consumption values being normal, that means that my thoughts about the package and dram calculation are right? 
"I suppose that Package energy is the CPU total energy without DRAM energy right? (PKG=uncore+cpu+gpu)".

Regards,
Carlos Portela

0 Kudos
Highlighted
Black Belt
61 Views

.>>> Is it normal that the rest(without CPU and RAM) of the laptop is consuming 3,77W? >>>

Beside laptop's monitor  additional energy consumers are: HDD, Eth NIC , Wifi NIC , even keyboard while typing will consume energy in order to generate interrupt albeit its energy consumption will be miniscule when compared to CPU or display power consumption.

0 Kudos
Highlighted
61 Views
Hello Carlos, On Linux you can use the powertop utility to see which devices are using power, set devices to lower power and reduce idle power. See https://01.org/powertop Pat
0 Kudos
Highlighted
Black Belt
61 Views

>>>About the consumption on my laptop, I'm using an external LCD screen connected to the laptop, should it consume that much anyway?>>>

Probably the power consumption will be lower when compared to built in display, but you should take into account frame buffer and  TDMS circuitry activity when sending digital data to external display. Clock frequency of such a signal is quite high , but it is hard to tell what is the resulting power consumption of video stream itself.

0 Kudos
Highlighted
Black Belt
61 Views

Regarding power consumption question I was able to find some data about the power disipation of Display Port to TDMS translator and device power disipation is 490 miliWatt. I do not know how this data can represent power consumption when external display is connected to your laptop.

http://www.ti.com/lit/ds/symlink/sn75dp129.pdf

0 Kudos
Highlighted
New Contributor I
61 Views

Hey,

I am asking these questions because I'm trying to develop a power utility on linux. The power utility should be capable to measure the power consumption by hardware component and then, estimate the power consumption by each process.. I mean, consumption by PID. 
The consumption variables from the outbound of the idle status are CPU, DRAM and HDD, right? Since I already have CPU and DRAM, I am now trying to calculate HDD consumption. It seems hard and I can only get the reads and writes per sec as information of disk usage.. If you have any other idea how to get that info, I would be thankful :)

Thanks by the support and help on the topic :)

 

 

0 Kudos
Highlighted
Black Belt
61 Views

I think that you should take measurement by Thread ID as process is not executed directly by the CPU at least on Windows OS.

I suppose that you should start looking for HDD manufacturers data about the max power consumption under various load and during various periods of device activity. Exact power dissipation information will probably be dependent on existance of specific hardware register. Such a register can be part of SATA specification or be part of HDD controller itself. I am not familliar with Linux very well and I suppose that there are built-in utilities which are used for monitoring disk activities.

0 Kudos
Highlighted
Black Belt
61 Views
0 Kudos
Highlighted
New Contributor I
61 Views

Hi,

Another question about this topic..
The DRAM Consumption that I get from RAPL is just Memory Controller or it is the TOTAL DRAM Consumption and includes the DIMM consumption too? 

Regards

0 Kudos
Highlighted
61 Views

Hello Carlos,

The RAPL DRAM energy is just for the DIMMs and doesn't include (as far as I know) any 'on package' or memory controller energy. Near as I can tell the DRAM energy is computed by assigning energy factors to various DRAM operations and simply accumulating the sum of factor*operation. Or at least that is what some of the datasheets leads me to believe since they talk about energy factors for operations like CAS and RAS and refresh (IIRC). I would expect (maybe I should say hope) that, for a memory bandwidth test near peak expected bw, then the RAPL DRAM power usage would be less than or equal to the rated max power usage of the DIMM * number of DIMMs.

Pat

0 Kudos
Highlighted
New Contributor I
61 Views

Hey,

I found on this link https://software.intel.com/en-us/articles/intel-power-governor some info about it too. It says there that PP1/Graphics Power Plane only works on Client and DRAM PowerPlane only works on Server. Anyway, I run my MSR readings and I am getting data for all the 4 domains.
I have a Desktop Client Platform: I
ntel core i5 4200m, RAM 8GB (Thinkpad Lenovo L440).

Check the picture please.

Do you think all the 4 domain values are right on the picture?

Best Regards,
Carlos Portela

0 Kudos
Highlighted
61 Views

Hello Carlos,

Looking at the SDM vol 3, it looks like MSR_PP1_ENERGY_STATUS is supported for the DF_DM (DisplayFamily_DisplayModel) below.

I think your system has a 06_45H DF_DM. Is that right? DF_DM is basically FamilyNumber_ExtModel+Model

DF_DM	codename
06_2AH	SNB/SandyBridge
06_3AH	IvyBridgeWS, IvyBridge, IVB/IvyBridge
06_3CH	Haswell, HaswellXeon, HSW/Haswell
06_3DH	Broadwell, Intel Core M-5xxx Processor, Future 5th generation Intel Core uarch= BroadwellHSW/Haswell
06_45H	HaswellULT, HSW/Haswell
06_46H	CrystalWell, HSW/Haswell
06_47H	BrystalWell, 5th generation Intel Core processors uarch= Broadwell
06_4EH	Skylake Y/U, SKL/SkyLake
06_5EH	Skylake H/S SKL/SkyLake

Although the SDM doesn't show MSR_DRAM_ENERGY_STATUS for DF_DM 06_45H, there is an equivalent MCHBAR-based register in the datasheet volume 2. I've got a query in to the SDM owner to see if the SDM should show MSR_DRAM_ENERGY_STATUS for haswell mobile systems.

Pat

0 Kudos
Highlighted
New Contributor I
61 Views

I am sure that my CPU is Haswell but there's more than 1 Haswell on that list. How can I check if mine belongs to 06_45h? 

Let's see what you get from the SDM owner.. It's really weird but I hope that these values are trustable.. what do you think about that 0.8 DRAM value?

Thank you for the help,
Carlos Portela

 

 

0 Kudos
Highlighted
Black Belt
61 Views

DRAM energy consumption is a big topic.   The low-power modes are complex and it is very hard to tell when/if a system is using them.

Any discussion of DRAM power consumption has to begin with a complete description of the DRAM configuration.    The notes below say that the system is a Lenovo ThinkPad L440 with an Intel Core i5-4200m. The processor is a Haswell with 2 DDR3 DRAM channels supporting either 1333 or 1600 transfer rates.  The 8 GiB of RAM could be configured in a fairly wide number of ways -- I count seven different 8 GiB configurations using various combinations of DRAM density, width, number of channels populated, and number of ranks per DIMM.    Of course, most of these configurations will have different power and performance characteristics.   Different vendors parts also have different power consumption characteristics, and if Intel has pre-programmed "nominal" values into the RAPL model, we don't know what they assumed.

If I had to guess without looking, I would assume that the most likely configuration for an 8 GiB laptop is 2 single-rank 4 GiB SO-DIMMs, each composed of 8 4 Gbit DRAMs with 8-bit interfaces.
Looking at the Micron DDR3L Power Consumption spreadsheet and replacing the data with the values from Samsung's 4 Gbit D-die (K4B4G0846D), I come up with about 0.9W Idle power consumption for this configuration.   There is certainly no guarantee that I have configured the power estimator correctly, but it does suggest that the 0.8 Watts reported is plausible for an idle system.

"Dr. Bandwidth"
0 Kudos
Highlighted
61 Views

You can look at your cpuid signature (input 0x1 to cpuid) and then look the value returned in eax (referred to as the cpuid signature).  You'l probably see 0x40651 where the 0x4 bits is extended model number. the 0x6 is the cpuid family. The 0x5 is the model number. The DF_DM is constructed by (in hex): xx_yz where xx is the family, y is the extended model and z is the model. So the DF_DM for 0x40651 we get 06_45H.

The SDM is going to add the MSR_DRAM_ENERGY_STATUS  MSR in an upcoming edition. But the value may be zero... I'm not sure if it requires bios support.

The value of 0.8 watts seems reasonable but I really am just guessing. It seems like, if you are running a peak memory bandwidth test such as stream or Intel MLC (memory latency checker) then the value should be higher... maybe like 3-5 watts per DIMM... but again, I'm guessing. There is a DRAM power estimation paper from Micron (TN41_01DDR3_Power.pdf) that mentions ~0.5 Watt per device. I just skimmed the pdf.

Pat

0 Kudos
Highlighted
New Contributor I
61 Views

 Well, seems that DF_DM is 06_3CH. Does it change anything?

      processor type  = primary processor (0)
      family          = Intel Pentium Pro/II/III/Celeron/Core/Core 2/Atom, AMD Athlon/Duron, Cyrix M2, VIA C3 (6)
      model           = 0xc (12)
      stepping id     = 0x3 (3)
      extended family = 0x0 (0)
      extended model  = 0x3 (3)

Well, I will run some benchmarks on it during the next days and try to understand if the values are reasonable on non-idle situations.

If you find something new to warn me about this RAPL weird situation, post please :)

I'm thankful for the help.

0 Kudos