VMware Cloud Community
biravram123
Enthusiast
Enthusiast

CPU allocation

HI,

I have a doubt in CPU allocation.

My scenario is one host have 8 cores(HT enabled) and 12 VM's are running on the host.As my understanding we can assign upto 16 vcpus for those vm's.

My question is "Can we allocate multiple vcpus to the vm's beyond 16 vcpus for 12 vm's,for example 18 or 20".I thought it is not possible.

Can someone clarify my doubt?

Regards

NS

Tags (1)
2 Replies
Anjani_Kumar
Commander
Commander

yes. you can assign more vcpu but that will make your cpu ready queue long and vm will take time to respond until the assigned resources will not be available to the vm.

A vCPU is basically a core or a hyperthread core.  The trick with assigning vCPUs is this:  However many vCPUs you assign to a VM have to all be available before that VM can run and conversely when a VM is running (i.e. it's getting its timeslice) the number of vCPUs assigned to it are tied up and cannot be used by another VM, even if the the VM to which they are assigned is idle and/or not using them all.  Also, ESXi is smart enough to assign vCPUs to physical cores when it's time for a VM to run such that it won't use the associated hyperthread core unless it has to because of the performance hit, although there are some settings you can use to tinker with this behavior.  As a practical matter what this means is that if you have several VMs each using quite a few vCPUs you run the risk of performance problems because they can't all be getting their timeslices at once due to a shortage of physical cores to map to vCPUs.  This problem is somewhat ameliorated by hyperthread cores in the case of a VM with several vCPUs tying up physical cores even though it's not using them all because in that scenario another VM which gets the hyperthread core, and this is allowed to run, will run at full speed.   What this also means is that if you have a number of VMs using several vCPUs your choice of hardware is better if you get a computer with more but slower cores rather than fewer faster ones, even though the total CPU power of both computers is the same.

Please read ESXi CPU consideration best practices from below white paper http://www.vmware.com/pdf/Perf_Best_Practices_vSphere5.5.pdf

Please consider marking this answer "correct" or "helpful" if you found it useful. Anjani Kumar | VMware vExpert 2014-2015-2016 | Infrastructure Specialist Twitter : @anjaniyadav85 Website : http://www.Vmwareminds.com
npadmani
Virtuoso
Virtuoso

8 cores with HT

gives you 16 logical CPUs.

My question is "Can we allocate multiple vcpus to the vm's beyond 16 vcpus for 12 vm's,for example 18 or 20".I thought it is not possible.

you are right, not possible.

per VM basis you cannot assign more than 16 vCPUs.

Narendra Padmani VCIX6-DCV | VCIX7-CMA | VCI | TOGAF 9 Certified
0 Kudos