VMware vSphere

 View Only
  • 1.  Assign CPU to VM

    Posted Mar 21, 2021 09:42 AM

    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?



  • 2.  RE: Assign CPU to VM

    Posted Mar 21, 2021 10:19 AM

    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é



  • 3.  RE: Assign CPU to VM

    Posted Mar 21, 2021 01:09 PM

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



  • 4.  RE: Assign CPU to VM

    Posted Mar 21, 2021 02:50 PM

    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é



  • 5.  RE: Assign CPU to VM

    Posted Mar 21, 2021 03:57 PM

    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



  • 6.  RE: Assign CPU to VM

    Broadcom Employee
    Posted Mar 22, 2021 10:12 AM

    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