VMware Cloud Community
Tuteks
Enthusiast
Enthusiast

Assign CPU to VM

Hello,

I use vsphere 7 essentials, now configured VM with Windows server 2019, and no matter how many CPU I assign to this VM, on guest OS my max CPU speed is 2.2Ghz is any way to increase CPU speed in guest OS?

0 Kudos
5 Replies
a_p_
Leadership
Leadership

No, the VM makes use of the hardware as is, i.e. can use multiple vCPUs (cores), and distribute threads across them, but there's no way to "combine" them into a single one.

André

0 Kudos
Tuteks
Enthusiast
Enthusiast

so if I set 16cpu to guest os, will have any benefits instead settings 4cpu?

0 Kudos
a_p_
Leadership
Leadership

It depends on whether the guest OS, and the applications that you run, support multi-threading (which should be the case for most modern applications). Please keep in mind that adding more vCPUs than required to a VM, may result in decreased performance, due to the CPU scheduling involved in this.

André

0 Kudos
Jimmy15
Enthusiast
Enthusiast

assigning more cpu in turn slow down the performance and increase Ready time (waiting for completing all threads to complete and sync among cpu).

regards


regards



PS: Mark kudos or correct answer as appropriate 🙂
0 Kudos
vbondzio
VMware Employee
VMware Employee

Since the first multi core / thread CPUs have been around, so has the question of whether it is possible "to combine multiple CPUs to increase single thread performance".

The short, and real world answer to that is still no, virtualization doesn't change that. The longer but mostly theoretical answer is covered by research into Speculative Multithreading (SpMT) / Thread Level Speculation (https://en.wikipedia.org/wiki/Speculative_multithreading). A good introduction is covered in https://escholarship.org/content/qt5620h0n6/qt5620h0n6.pdf (not that I'm in any way an authoritative source on what is "good", I barely understand 20% of the words).

As far as guest level perceived frequency goes, the "2.2GHz" you are looking at is most likely part of the cpuid brandstring or maybe the TSC speed. The guest OS (by default) doesn't have access to the CPU HW counters (e.g. NHCC, A/MPERF) to assess the running frequency of the underlying CPU. If you want to optimize for single thread performance, your best bet is to make sure Turbo Boost is configured adequately via BIOS and ESXi power management policies. The first ~20 minutes here cover that: https://www.vmworld.com/en/video-library/video-landing.html?sessionid=15614128031020019IBb&region=EU

0 Kudos