Software Tuning, Performance Optimization & Platform Monitoring
Discussion regarding monitoring and software tuning methodologies, Performance Monitoring Unit (PMU) of Intel microprocessors, and platform updating.

RAPL - Per Core Power Measurement / Capping

Dave_W_2
Beginner
2,889 Views

Hi,

I'm trying to use RAPL to measure and powercap individual cores.
However, it seems that my experiments only achieve measurement / capping of all cores.

I have tried two ways to control the power on a per-core basis. My first attempt was to use the sysfs interface at "/sys/class/powercap/intel-rapl". Unfortunately, it only distinguishes between core ("intel-rapl:0:0"), uncore ("intel-rapl:0:1") and dram ("intel-rapl:0:2") for each package and does not subdivide into separate cores.
My second attempt was then to manually write a proper value into the MSR of each core ("/dev/cpu/$core/msr"), but this doesn't seem to work either.

I'm working with an Intel Xeon CPU E3-1275 v5 (Skylake, Family 6, Model 94).
Is there any way to measure and / or powercap individual cores with RAPL?

Thank you!

0 Kudos
5 Replies
Kevin
Beginner
2,889 Views

Hi Dave,

When I followed your first approach and tried to cap the power by edit /sys/devices/virtual/powercap/intel-rapl/intel-rapl:0/constraint_0_power_limit_uw, the error message showed up: "constraint_1_power_limit_uw" E667: Fsync failed" even by using the root privilege. Do you have any ideas how to capping for all cores?

Thanks,

Kevin

0 Kudos
Srujan_S_
Beginner
2,889 Views

Kevin - Are you able to read the sysfs files, in the first place? I suspect there might be a BIOS/Kernel lock.

0 Kudos
APand8
Beginner
2,889 Views

Hello Srujan S, can you guide me how to unlock the RAPL limits? In my system, the BIOS has locked the RAPL package and DRAM limits. I can change the PP0 and PP1 limits but not Pkg and DRAM. I am using a Haswell m/c with Ubuntu 14.04 OS. Any help will be highly appreciated. than you.

0 Kudos
sbhal1
New Contributor I
2,889 Views

Anmol Panda wrote:

Hello Srujan S, can you guide me how to unlock the RAPL limits? In my system, the BIOS has locked the RAPL package and DRAM limits. I can change the PP0 and PP1 limits but not Pkg and DRAM. I am using a Haswell m/c with Ubuntu 14.04 OS. Any help will be highly appreciated. than you.

I had a similar problem with one of the machines. If the 63-bit of the RAPL_PKG_POWER_LIMIT has been set at boot by the BIOS, you cannot change it thereafter. I was told the only solution is to update to a BIOS version that has the 63-bit disabled.

Hope this helps.

0 Kudos
sbhal1
New Contributor I
2,889 Views

Anmol Panda wrote:

Hello Srujan S, can you guide me how to unlock the RAPL limits? In my system, the BIOS has locked the RAPL package and DRAM limits. I can change the PP0 and PP1 limits but not Pkg and DRAM. I am using a Haswell m/c with Ubuntu 14.04 OS. Any help will be highly appreciated. than you.

I had a similar problem with one of the machines. If the 63-bit of the RAPL_PKG_POWER_LIMIT has been set at boot by the BIOS, you cannot change it thereafter. I was told the only solution is to update to a BIOS version that has the 63-bit disabled.

Hope this helps.

0 Kudos
Reply