VMware Cloud Community

Confusion with logical vs virtual CPUs

I've recently been setting up 2 VMs on 1 Physical host using ESXi 5.5.  Both VMs are running Windows Multipoint Server 2012 each with 12 stations.  Overall things are going well, but I am confused by how CPU virtualization works with hyperthreading (logical cores).  Let me lay out the scenario:

1. Physical machine has 2 hexacore Intel processors running at 2.5 Ghz.  12 cores total, hyperthreading enabled.

2. In vCenter I show 12 cores X 2.50 Ghz.  This equals 30 Ghz of total processing power which is shown on every graph within vcenter.

3. When selecting vCPUs, due to hyperthreading, I can choose up to 24. 

4. If I choose 12 vCPUs per machine (24 total), the CPU usage runs off the chart and kills one of the VMs. 

5. Looking at the vCPU settings shows that each vCPU that is added allows another 2.50 Ghz of usage.  If all 24 are added I get 60 Ghz total...which is impossible.

My questions:

1. If I choose 6 vCPUs per machine (12 total) I'm sticking within the limits of the total 30 Ghz of usage.  Am I actually using all the logical cores?  In other words, am I even using hyperthreading if I only assign half of the allowable logical cores?

2. If i turn off hyperthreading in vCenter, but leave it on in the bios, will every vCPU actually be a hyperthreaded core?

Thanks for any responses.

Tags (1)
0 Kudos
1 Reply
Hot Shot
Hot Shot

The number of vCPUs is divisible by the number of cpuid.coresPerSocket in the virtual machine. That is, when you divide the number of vCPUs by the number of cpuid.coresPerSocket , it must return an integer value. For example, if your virtual machine is created with 8 vCPUs, coresPerSocket can only be 1, 2, 4, or 8.

This KB is really useful in case you want to know more about Vcpu

VMware KB: Setting the number of cores per CPU in a virtual machine

Best regards

Your Oscar

0 Kudos