[SOLVED] weird CPU speed

TwiX

Renowned Member
Feb 3, 2015
311
23
83
Hi,

I don't know why but CPU speed seems to be very low.
On a fresh install of pve5 with 2 x Intel(R) Xeon(R) CPU E5-2640 v3 @ 2.60GHz I have :

Code:
root@dc-prox-06:~# lscpu
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                32
On-line CPU(s) list:   0-31
Thread(s) per core:    2
Core(s) per socket:    8
Socket(s):             2
NUMA node(s):          2
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 63
Model name:            Intel(R) Xeon(R) CPU E5-2640 v3 @ 2.60GHz
Stepping:              2
CPU MHz:               1199.865
CPU max MHz:           3400.0000
CPU min MHz:           1200.0000
BogoMIPS:              5193.62
Virtualization:        VT-x
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              20480K
NUMA node0 CPU(s):     0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30
NUMA node1 CPU(s):     1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31

The CPU seems to be not running @ its maximum speed, but adapts speed depending of the load :

Code:
root@dc-prox-06:~# cat /proc/cpuinfo | grep -i 'mhz'
cpu MHz        : 1199.865
cpu MHz        : 1499.633
cpu MHz        : 1200.817
cpu MHz        : 1599.926
cpu MHz        : 1199.865
cpu MHz        : 1499.951
cpu MHz        : 1199.865
cpu MHz        : 1999.987
cpu MHz        : 1200.024
cpu MHz        : 1899.853
cpu MHz        : 1200.024
cpu MHz        : 1199.230
cpu MHz        : 1200.024
cpu MHz        : 1799.877
cpu MHz        : 1200.024
cpu MHz        : 1199.865
cpu MHz        : 1200.024
cpu MHz        : 1499.951
cpu MHz        : 1200.183
cpu MHz        : 1599.926
cpu MHz        : 1200.500
cpu MHz        : 1499.792
cpu MHz        : 1200.024
cpu MHz        : 1999.987
cpu MHz        : 1200.183
cpu MHz        : 1899.853
cpu MHz        : 1200.024
cpu MHz        : 1199.865
cpu MHz        : 1200.183
cpu MHz        : 1799.877
cpu MHz        : 1200.183
cpu MHz        : 1199.865


Code:
root@dc-prox-06:~# cat /sys/devices/system/cpu/cpufreq/policy0/scaling_governor
performance

Is there a way to get cpu speed at least @ 2.6 Ghz ?
Is this behaviour has impact on VMs performance ?

Thanks a lot !

Antoine
 
The CPU seems to be not running @ its maximum speed, but adapts speed depending of the load :

Yes, you are exactly right. Every modern cpu does this, for good reason. You may play with cpu-governor, but why would you do that? Why do you want your cpu to run with the highest clock, if it does not do anything???
 
Hi,

It doesn't matter if it doesn't impact vm performance. For example with old proxmox v3 and old kernel 2.6 on same hardware :

Code:
root@dc-prox-04:~# cat /proc/cpuinfo | grep -i 'mhz'
cpu MHz        : 2597.223
cpu MHz        : 2597.223
cpu MHz        : 2597.223
cpu MHz        : 2597.223
cpu MHz        : 2597.223
cpu MHz        : 2597.223
cpu MHz        : 2597.223
cpu MHz        : 2597.223
cpu MHz        : 2597.223
cpu MHz        : 2597.223
cpu MHz        : 2597.223
cpu MHz        : 2597.223
cpu MHz        : 2597.223
cpu MHz        : 2597.223
cpu MHz        : 2597.223
cpu MHz        : 2597.223
cpu MHz        : 2597.223
cpu MHz        : 2597.223
cpu MHz        : 2597.223
cpu MHz        : 2597.223
cpu MHz        : 2597.223
cpu MHz        : 2597.223
cpu MHz        : 2597.223
cpu MHz        : 2597.223
cpu MHz        : 2597.223
cpu MHz        : 2597.223
cpu MHz        : 2597.223
cpu MHz        : 2597.223
cpu MHz        : 2597.223
cpu MHz        : 2597.223
cpu MHz        : 2597.223
cpu MHz        : 2597.223

Outch....
 
I do not have PVE 3.x so I can only guess it either did not support frequency scalling yet, or used "performance" as default cpu governor (cpu running all the time at 100% frequency). I suppose new PVE5/Debian9 is using "on-demand" governor, which makes much more sense. It has no drawbacks, but some advantages (saves power, reduces temperature, prolongs lifetime, etc).

Forget about it, and let it be as it is. As I said, you can override it, but it's like driving the car, waiting at the crossing for green light, and pushing gas pedal down to the floor all the time: engine at max revs, but doing nothing. What is it good for?
 
... and then you hit the next set of red lights and then realize same guy as was at last set of lights comes along next to you but him and his engine are much less stressed.
 
I'm also not sure that host cpu speed hits its maximum speed when a vm takes 100% of its vCPUs...
 
Try (i.e. fire Prime95 in your VM) and see yourself! It can even hit higher than standard maximum frequency, depending on how many cores your VM is using. E5-2640 v3 has standard max 2.6GHz, but it also supports "Intel turbo boost" (2/2/3/4/5/6/8/8). So if only 1 or 2 cores are needed, it can go up to 3.4GHz...
 
I thought I could just do a simple 'cat /dev/zero > /dev/null' :p

I'll keep you in touch if you want to :D
 
Hi, solved.

I can confirm that when a VM need 100% of its vCPUs, host CPU increases speed until 100 % and turbo works as expected (2.6 => 3.4 Ghz)

:D
 
personnaly, I disable pstate to have stable frequency. (but I don't have turbo) and avoid clock sync problems in my guests vm.

/etc/default/grub/
GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_pstate=disable"
 
Hi,

Works as expected thanks. Indeed turbo is not working anymore. I also think it's better to have cpu working @ its standard speed.

Antoine
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!