VMware ESX server

vmware-esx

I have ESX server with 8 CPUs. Can I create 4 VMs with 4 VCPUs?

Best Answer

The best explanation I've heard for 'You should only have one vCPU per VM' is as follows:

When a VM wants a portion of processing time, it waits by the sidelines until it can put a lock on n physical CPU's, where n is the number of vCPUs the VM has. If there is only one vCPU within the VM, it only has to wait until one physical CPU is available before it can jump in and get some stuff done. If it has two or more vCPU's, it has to wait until two or more CPU's are simultaneously available before it jumps in and gets on with things (It will not lock one CPU at a time and wait for more to follow it- it has to wait for multiple to be available before it can pounce)

If you have a bunch of single-vCPU VM's thrashing the physical CPU's, and one multiple-vCPU VM wanting to process, it will possibly have to wait for quite some time as the single-vCPU VM's jump in and keep snatching away spare CPU's before the multiple-vCPU box can get a lock on the number of CPU's that it needs.

VM's lock, use and unlock CPU's rapidly, but the above behaviour can cause poor performance of multi-vCPU boxes in certain situations.

I hope that makes sense (There were a lot of CPU and vCPU and VM mentions, I hope I didn't mix anything up)

This is only heresay - my boss attended VMWare training and relayed the above story to me. It has gone from instructor to my boss to me to you, so take it as you will.

Related Topic