vCPU count

Should VMs under sphere has even number of vCPUs? like 2,4 and so? or it does not matter?

View Reddit by sukur55View Source

Related Articles


  1. The ESXi thread scheduler will greatly appreciate you using the minimum number of vCPUs required to handle your particular workload on each individual VM. There’s no need to go by 2s. Ideally, you will start all VMs with 1 vCPU. Move to 2, 3, 4, etc. only as necessary.

    Typically anything that would use over 4 I look to break up the workload on it. Either DB clustering or some sort of load balancing if it’s a web application or other app that will play nicely with that. Most people have environments packed with overprovisioned VMs wasting tons of cycles spinning away in high CPU Ready Times.

  2. It doesn’t really matter, until you start considering the CPU scheduler. I’d be interested to hear your use case for odd numbered vCPUs, though.

  3. What are the workloads like?

    Are your VMs waiting for CPU? (Ready Time)

    I have seen real world implications to scheduling odd numbered CPUs above 1. From within the OS and Ready Time hits, horrible ones.

    While the scheduler is way better today than on 5.5, the OS layer still doesn’t deal with 3, 5, and other odd configurations well typically. Depends on the OS heavily.

    The only true answer is, how many does the VM actually need? If you aren’t getting the expected performance on one VM, add a couple CPU.

  4. Start with 1vCPU per VM, poll stats from the GUI AND esxtop(ssh) and look for thread execution under your VM(World for esxtop). If you sustain 60%+ during your peak usage for more then 2-3mins then snap in another core. Rinse and repeat.

  5. Nope, you should have the minimum number of vCPU required to meet the performance requirements of your workload and no more.

    If you have a quad core CPU, with a 3 core VM and a 1 core VM, they can execute in parallel. If you made either the single core into a dual core or the tri core into a quad core, they can’t. So it helps the ESXi scheduler to be as efficient as possible.

Leave a Reply