cyring / CoreFreq

CoreFreq : CPU monitoring and tuning software designed for 64-bit processors.
https://www.cyring.fr
GNU General Public License v2.0
1.97k stars 126 forks source link

dual-socket CPU power: Core power is greater than package? #359

Closed Rimits closed 2 years ago

Rimits commented 2 years ago

Is it normal or a bug that Core Power 279W is greater than Package Power 210W ?

OS:ubuntu 20.04 CoreFreq version: 1.91.5 CPU: epyc 7542 *2 Motherboard: Gigabyte 截屏_20220810-105720

cyring commented 2 years ago

It is not normal and dual EPYC is barely never tested; before your screenshot.

Need to debug: send you code changes; is your dual socket platform available for experimentation ?

cyring commented 2 years ago

Without better specs, I think Package refers to one socket.

This might explain the issue.

Rimits commented 2 years ago

Of course, I can do some experiments on that server. The 279W of cores power could be accurate, because the BMC shows the current and voltage of VRM_CPU0 are 142A and 0.94V. Package watt seems accurate too since the cpu is limited to 225W. Maybe appending a "0" to the Package label will fix the misleading situation.

The same goes the 480W TDP and 240W PL2. 截屏_20220810-141207

cyring commented 2 years ago

The label Package0 is a good suggestion.

You can also target the second socket for a Package watt reading. You'll have to bind the CoreFreq Service Processor to a CPU which belongs to second socket.

  1. Refer to the Topology to find a CPU of second socket. Let's say 64
  2. Reload the driver this way:
    
    insmod corefreqk.ko ServiceProcessor=64

Or adapt your modprobe


3. Please provides a screenshot of the `Power` view

Remarks:
* I'm presuming Package0 and Package1 should slightly differ ?
* When not specified, Service Processor is selected according to kernel scheduling
* Service Processor can be assigned to any socket
* If CPU is disabled, Service Processor is auto migrated by driver
* UI is always highlighting the CPU number of the Service Processor and its SMT, (and the Hybrid with Intel 12th gen.) 
cyring commented 2 years ago

Of course, I can do some experiments on that server. The 279W of cores power could be accurate, because the BMC shows the current and voltage of VRM_CPU0 are 142A and 0.94V. Package watt seems accurate too since the cpu is limited to 225W. Maybe appending a "0" to the Package label will fix the misleading situation.

0.94V in your readings is during idle case

Computing from my Matisse voltage of 1.48 V (instant load voltage) and your Rome current of 142A, I'm getting a consumed power P = V x I of ~ 210W

Rimits commented 2 years ago

Topology:

 ---------------------------------- Topology ----------------------------------      
 CPU Pkg  Apic  Core/Thread  Caches      (w)rite-Back (i)nclusive              
  #   ID   ID CCD CCX ID/ID L1-Inst Way  L1-Data Way      L2  Way      L3  Way 
 000:BSP    0   0  0   0  0      32  8        32  8       512  8 i  131072 16w  
 001:  0    2   0  0   1  0      32  8        32  8       512  8 i  131072 16w 
 ...
 031:  0   62   6  7  31  0      32  8        32  8       512  8 i  131072 16w 
 032:  1  128   0  0   0  0      32  8        32  8       512  8 i  131072 16w 
 033:  1  130   0  0   1  0      32  8        32  8       512  8 i  131072 16w 
 ...                                          
 ------------------------------------------------------------------------------

Reload: insmod corefreqk.ko ServiceProcessor=32

Result: 截屏_20220810-151335

When Service Processor is 19: They are slightly different, since CPU2 is cooler and the frequency is higher. 截屏_20220810-151559

cyring commented 2 years ago

For your information, below specs of the two Power registers (RAPL):
2022-08-10-093717_801x235_scrot 2022-08-10-093803_802x290_scrot

cyring commented 2 years ago

Hello,

Can you try this attached version where the Package ID is appended to label. Should print 0 or 1 depending of your selected Service Processor.

CoreFreq_develop.tar.gz

Two UI views are impacted:

And two CLI outputs are impacted:

[EDIT] Remark: Custom view is a problem. I don't find enough space in its footer line.

Rimits commented 2 years ago

Thx, it's less confusing now. 截屏_20220810-164917

cyring commented 2 years ago

Meanwhile I have enhanced the Custom view CoreFreq_develop.tar.gz

Rimits commented 2 years ago

well, you do have a fast hand🚴 截屏_20220810-171014

cyring commented 2 years ago

well, you do have a fast handbicyclist ![截屏_20220810-171014]

Thank you.

I'll leave those changes in the develop branch for a short while; making sure no regression happens on other systems.