CPU type change for a VM

ieronymous

Active Member
Apr 1, 2019
251
18
38
44
I d like your opinion (more of experience) on a matter I am dealing with, So I ve set up some VM's selecting as cpu type at that time, the default kvm64. Noticed afterwards that OSes (Windows 10 and Windows 2019) were kind of laggy . Specially the SQL management studio timed needing 27sec to fully load. Changing from gui (hardware options) the cpu type to host (by the way an E5-2650 v1) and after 3 manually restarts of Win10 it did change the processor type inside from common KVM processor to the one host is using. SQL management studio loaded at 15sec from 27 which is a lot quicker but one thing I noticed was if I bench the cpu in order to see the frequency go from default 2.00 to 2.80 it just stays at 2ghz.

My questions after the above explanation of the system are
-Does the cpu change procedure needs to be done in a different way or change the type in different fields also except from gui, like cli in the VM's conf file?
-Is there a correlation if the VM is licenced or not to the procedure of changing the cpu type?
-Does it matter the type of the OS installed? Windows 10 were licensed but I have 2x2019 Win also unregistered until I decide what fits best.
-How come and the frequency stays at 2Ghz during stressing while the cpu is capable of 2.8 max?

Thank you in advance

PS I know about the pros and cons of using the default kvm64 cpu and also the intermediate benefit from changing to the virtual family the host machine is using in general without specifying one (like choosing westemere, ivybridge....etc)
 
Last edited:
- No, change the CPU type in the GUI is sufficient.
- The is no change in procedure for any kind of OS. Maybe changing it invalidates the Windows license? Please ask Microsoft if you have questions about their licenses.
- Make sure the OS Type setting of the VM (in Options) is correct. I don't know about Microsoft Windows licenses, sorry.
- It is normal for the VM to report the base clock of the actual CPU. The "boosting" (or power-saving by clocking down) of the actual CPU is never seen inside the VM but it can be observed on the Proxmox host.
 
- It is normal for the VM to report the base clock of the actual CPU. The "boosting" (or power-saving by clocking down) of the actual CPU is never seen inside the VM but it can be observed on the Proxmox host
Thanks for the above confirmations, I could second that now since I created a VM from scratch with cpu type as host only to check if that would make any difference but I had the exact same behavior. CPU locked at 2Ghz. You mentioned from the outside the VM on the host side I could see the actual frequency for the VM. Do you mean at the summary tab of the VM? There the cpu usage is being displayed as percentage and at the graph even though the y axe shows again percentage if you let the mouse on the spike it has a number which correlates better to a frequency number. Is that where you can see the cpu?
 
Thanks for the above confirmations, I could second that now since I created a VM from scratch with cpu type as host only to check if that would make any difference but I had the exact same behavior. CPU locked at 2Ghz. You mentioned from the outside the VM on the host side I could see the actual frequency for the VM. Do you mean at the summary tab of the VM? There the cpu usage is being displayed as percentage and at the graph even though the y axe shows again percentage if you let the mouse on the spike it has a number which correlates better to a frequency number. Is that where you can see the cpu?
You cannot see the frequency "for the VM". The frequencies of the physical CPUs varies and there is no 1-to-1 mapping of virtual CPUs to physical CPUs. You can use cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq on the Proxmox console to see the current frequencies for your CPUs (or cores or (hyper)threads depending on your actual hardware).
 
You cannot see the frequency "for the VM". The frequencies of the physical CPUs varies and there is no 1-to-1 mapping of virtual CPUs to physical CPUs. You can use cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq on the Proxmox console to see the current frequencies for your CPUs (or cores or (hyper)threads depending on your actual hardware).
A little hard to identify the actual cores used for the VM even with all other VM s and CTs have shut down. The fluctuation doesn't let you have a better perspective of what has been assigned to which VM. Nice command to know though. Thanks

PS I ll try to bench the VM having first as cpu kvm64 then host and then the general family of the cpu the host is using and compare the results. I hope the general family cpu type to have same results as host to leave it to a more generalized type (for future compatibility upon VM migration or relocation)

PS Is there a command for the pve to run after changing cpu type in order to take it in consideration online or it is better to restart host
 
Last edited:
PS I ll try to bench the VM having first as cpu kvm64 then host and then the general family of the cpu the host is using and compare the results. I hope the general family cpu type to have same results as host to leave it to a more generalized type (for future compatibility upon VM migration or relocation)
As mentioned here are the results from Cinebench and Geekbench 5 (results have more meaning with this app). I ll go from lower to better

Spoiler: Host>Qemu64>Sandybridge family>Kvm64 (Better to worse)

kvm64 (had the lower scores)
Cinebench (multi-core): 1520 points

Geeekbench 5 (single-score):439
GEEKBENCH 5 (multi-score):1585
///////////////////////////////////////////////////
Sandybridge family
Cinebench (multi-core): 1538 points

Geeekbench 5 (single-score):479
GEEKBENCH 5 (multi-score):1682
///////////////////////////////////////////////////
Qemu64
Cinebench (multi-core): 1545 points

Geeekbench 5 (single-score):500
GEEKBENCH 5 (multi-score):1684
///////////////////////////////////////////////////
Host
Cinebench (multi-core): 1542 points

Geeekbench 5 (single-score):530
GEEKBENCH 5 (multi-score):1756
///////////////////////////////////////////////////

Unfortunately trying to choose Ivybridge-IBS couldnt start the VM at all with syslog warning
kvm: warning: host doesn't support requested feature: CPUID.07H:EDX.spec-ctrl [bit 26]
kvm: Host doesn't support requested features
TASK ERROR: start failed: QEMU exited with code 1
Maybe Ivybridge-IBRS is for the new features came with v2 cpu's not v1. So when trying enabling that specific feature CPUID.07H:EDX.spec-ctrl [bit 26] fails and prevents VM from loading

Lastly I forgot to mention that bios was seabios and as machine type the default PC-I440FX-5.2 i dont know if during installation had chosen q35 had better results (maybe the last thing to check)
 
Last edited:
A little hard to identify the actual cores used for the VM even with all other VM s and CTs have shut down. The fluctuation doesn't let you have a better perspective of what has been assigned to which VM. Nice command to know though. Thanks
Like already mentioned, there is no mapping of cores to VMs. For the host it's all processes.

PS I ll try to bench the VM having first as cpu kvm64 then host and then the general family of the cpu the host is using and compare the results. I hope the general family cpu type to have same results as host to leave it to a more generalized type (for future compatibility upon VM migration or relocation)
I would evaluate on that once it becomes relevant. For the time being I would go with host cpu type wherever possible.

PS Is there a command for the pve to run after changing cpu type in order to take it in consideration online or it is better to restart host
Restarting the VM should be sufficient.
 
Like already mentioned, there is no mapping of cores to VMs. For the host it's all processes.


I would evaluate on that once it becomes relevant. For the time being I would go with host cpu type wherever possible.


Restarting the VM should be sufficient.
Thanks for the confirmations. I have it all on host for the time being.
 

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!