We are currently in the process of assigning vCPUs to virtual machines.
The question arises what exactly counts as vCPU.
The host has 2 sockets with 4 cores and as it is an E5620 HT is also supported.
So what is the number of available vCPUs 8 or 16?
vSphere client shows 16 logical processors on the overwiev tab.
Thanks for your help.
the maximum is 8-way using license Enterprise Plus, in you case you can allocate 8vcpu to 1 VM if you have license Enterprise Plus.
As a best practice, assign as many vCPUs as needed, but as less as possible!
Always keep in mind you are running multiple virtual machines on one server. Therefore the Hypervisor has to schedule the CPU. Assigning too many vCPUs to a VM could decrease to overall performance of all VMs.
Regarding Windows VMs: Since Windows uses a different HAL for single and multi processor systems, I usually start with 2 vCPUs and - very rarely - "upgrade" VMs to more vCPUs if really needed.
Thanks for all for the answers.
Rereading my post I saw that my question wasn't precise enough to get the answer desired.
I wanted to know the number of vCPUs available on the host alltogehter and not the max for a single VM.
For allover system performance reasons we try to avoid huge overcomitting of vCPUs.
If we have 8 vCPUs we would assign 2 vCPUs to each of 4 VMs
If we have 16 vCPUs we would assign 4 vCPUs to each of 4 VMs
Thanks again for your suggestions.
With 2 quad core CPUs and active HyperThreading you will have 16 vCPUs.
However - in my opinion - you only have 8 real vCPUs since HyperThreading is not a real core but only a way to simultaneously use a processor/core.
Overcommitting CPUs is not a bad thing and basically an advantage of the virtualization. Most virtual machines never use the full performance of a vCPU and therefore you can easily overcommit without issues. Running 20-30 VMs on an 8 core system is nothing unusual.
The only issue is that assigning too many vCPUs to a single VM can slow down the system because of the need to schedule the cores. Also don't forget to take the hypervisor into account, it also needs some CPU cycles.
thanks again for your answer.
Sure overcommitting CPUs is normally not a problem and can be a good thing.
However if you have 4 VMs on a host each under heavy load IMHO there is no point in overcommitting
as the allover CPU power is limited by the number of physical cores.
Moreover if you have VMs with a huge number of vCPUs assigned the scheduler can only
assign computing cycles if it finds an adequate number of idle physical cores.
So to make the question less abstract, assuming 4 VMs each maxing out CPU power,
would you assign 2 or 4 vCPUs for each on the host in question?
To answer your question: I would most likely assign 2 vCPUs. However you should (and I'm sure you will) test the setup in your environment with your workload.
There are some interesting blog posts about HyperThreading, like http://vpivot.com/2010/03/06/hyper-threading-on-vsphere/
Thanks for the link.
Edit: on the blog you posted there was an interresting aritcle dealing with