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

Power Capping by Power Governor and Power Gadget on Linux

Kevin
Beginner
1,580 Views

Hi everyone,

When I tried to use Power Governor(https://software.intel.com/en-us/articles/intel-power-governor) and Power Gadget(https://software.intel.com/en-us/articles/intel-power-gadget-20) to get the power consumption info of CPU, I got the following error:

RAPL not supported, or machine model 306f2 not recognized.

Init failed!

When I followed the README.md to "modprobe msr" and "modprobe cpuid", it shows:

FATAL: Module mrs not found.

FATAL: Module cpuid not found.

 

I found any posts in the forum but didn't find any problems like this.

The Purpose is to get the power consumption/temp info in a program.

Does anyone have any ideas how to deal with the problems above of these two tools or other methods to get the power consumption in a program? 

 

Best wishes,

Jiawen

0 Kudos
1 Solution
Carlos_P_
New Contributor I
1,580 Views

With that details, I believe your "DisplayFamily_DisplayModel" is 06_3FH.
Well, just checked on the Intel® 64 and IA-32 Architectures Software Developer’s Manual Documentation by that ID and I find RAPL registers available... 
Try running this sample code: http://web.eece.maine.edu/~vweaver/projects/rapl/ (Userspace Access without perf)

Regards

View solution in original post

0 Kudos
9 Replies
Kevin
Beginner
1,580 Views

Hi everyone,

Does anyone know how to figure out this problem? I appreciate if anyone could give me any suggestions or ideas.

Thanks,

Jiawen

0 Kudos
Carlos_P_
New Contributor I
1,580 Views

Hi,

What's your CPU model?

Regards

0 Kudos
Kevin
Beginner
1,580 Views

Hi Carlos,

The CPU is  Eighteen-Core/36-Threads Intel® Xeon® E5-2699 v3 2.3GHz-45MB Shared L3 Cache-9.6GT/s QPI-145W-22nm. Does it support the rapl architecture?

Carlos P. wrote:

Hi,

What's your CPU model?

Regards

0 Kudos
Carlos_P_
New Contributor I
1,581 Views

With that details, I believe your "DisplayFamily_DisplayModel" is 06_3FH.
Well, just checked on the Intel® 64 and IA-32 Architectures Software Developer’s Manual Documentation by that ID and I find RAPL registers available... 
Try running this sample code: http://web.eece.maine.edu/~vweaver/projects/rapl/ (Userspace Access without perf)

Regards

0 Kudos
Kevin
Beginner
1,580 Views

Hi Carlos,

When I compile the code, I still get the error message as below:

[liu@fornax ~]$ gcc rapl-read.c 

/tmp/ccKurDYv.o: In function `rapl_msr':

rapl-read.c:(.text+0x3f6): undefined reference to `pow'

rapl-read.c:(.text+0x43b): undefined reference to `pow'

rapl-read.c:(.text+0x480): undefined reference to `pow'

collect2: error: ld returned 1 exit status

 

Do you know what is the reason?

Thanks,

Jiawen

0 Kudos
Carlos_P_
New Contributor I
1,580 Views

Hey,

you need to compile with the flag -lm

regards

0 Kudos
Kevin
Beginner
1,580 Views

Hi Carlos,

After I run it, I got the following info showing that No perf_event rapl support found. I still didn't get the power consumption of CPUs. Do you know what's the problem?

[liu@fornax ~]$ sudo ./a.out 

 

No perf_event rapl support found (requires Linux 3.14)

Falling back to raw msr support

Found Haswell-EP CPU

Checking core #0

Power units = 0.125W

CPU Energy units = 0.00006104J

DRAM Energy units = 0.00001526J

Time units = 0.00097656s

 

Package thermal spec: 145.000W

Package minimum power: 69.000W

Package maximum power: 290.000W

Package maximum time window: 0.045898s

Package power limits are unlocked

Package power limit #1: 145.000W for 0.009766s (enabled, clamped)

Package power limit #2: 174.000W for 0.002930s (enabled, clamped)

 

Package energy before: 75131.813354J

PowerPlane0 (core) for core 0 energy before: 0.000000J

rdmsr:pread: Input/output error

 

Thanks,

Jiawen

0 Kudos
Carlos_P_
New Contributor I
1,580 Views

Hi Jiawen,

https://software.intel.com/pt-br/forums/software-tuning-performance-optimization-platform-monitoring/topic/557622

Check that topic best reply from Patrick. Maybe you have a similar problem so, there are some MSR's that are not compatible with your processor, maybe they are the same since it is a E5 too.

Check if it will help you!

Try it and give some feedback :)

Regards! 
 

0 Kudos
Koji_T_
Beginner
1,580 Views

Hi all,

I'm having the same problem. The CPU is Xeon(R) CPU E5-2680 v3. Isn't there a way to make it work?

Thanks.

0 Kudos
Reply