VMware Cloud Community
nmedard
Enthusiast
Enthusiast

vcore/vcpu

Hi All,

i am a bit confused about vCPU/vCore etc.

If for example I have a server with 2 physical processor of 6 cores? How these 12 cores are broken down?

Does 1vCore = 1Physical core(in this case I will have a total of 12 x vCores)??

Does 1vCPU = 1Physical CPU(in this case I will have a total of 2vCPU)???

Thanks

Nicolas

5 Replies
Alistar
Expert
Expert

Hi there,

the vCPUs are always co-scheduled on a physical CPU (so for 4 vCPUs you need to have 4 physical cores ready to process the instruction at the same time) - the total number of vCPUs relies on how much resources you want to overcommit on the ESXi host (if scaled well, that is). You can even have as much as 24+ vCPUs in total - it all depends on what kind of workload you plan on running.

Just make sure you avoid the 6vCPU (or any number of CPUs that you have on a single socket) boundary because of NUMA node traversing which can affect your memory access times & CPU access adversely.

Stop by my blog if you'd like 🙂 I dabble in vSphere troubleshooting, PowerCLI scripting and NetApp storage - and I share my journeys at http://vmxp.wordpress.com/
schepp
Leadership
Leadership

Hi,

in basic, 1 vCPU (which you configure for your VM) is mapped to 1 logical core.

What a logical core is depends on your server.

If you got 2 AMD CPUs with 6 cores each, you got 12 physical cores, which is 12 logical cores.

If you got 2 Intel CPUs with 6 cores each and Hyperthreading enabled, you got 12 physical cores, but 24 logical cores thanks to Hyperthreading.

So your maximum amount of vCPUs you could configure with vSphere 5.5 would be 12 vCPU per VM on said AMD CPUs and 24 vCPUs on Intel.

Now the more VMs you create with more and more vCPUs, more vCPUs run per logical core. A normal ratio you often see in production is 1-5 vCPUs per locigal core. It really depends on your workloads, whats suitable for your environments.

Hope I didn't confuse you even more Smiley Wink

Tim

nmedard
Enthusiast
Enthusiast

Thank you Alistar

nmedard
Enthusiast
Enthusiast

Hi Tim,

Actually you answered many unasked questions.  Thank you

If I understand it well

1 physical core = 2 logical core with Hyper thereading

1 vCPU = 1logical core ??

1 vcore = 1 vCPU??

Normally we allocate vCPU or vCore to VMs??

Reply
0 Kudos
Alistar
Expert
Expert

HyperThreading is here only to help you offload some work simultaneously with one compute cycle - the performance gains are 20% per hyperthreaded core at best and only with certain workloads on desktop, I'm not even sure that virtualization can yield that much performance increse. You always associate a physical core to a vCPU and HT steps in where help is needed - you can observe esxtop while the VM is running - great guide is here ESXTOP - Yellow Bricks and press "C" for monitoring how the workload jumps around the physical CPUs - the VM does not stay only on one core - the VMkernel schedules the virtual machines to run on the least contended CPU.

My best bet would be that HT helps offload 5-10% of the total CPU frequency, but I'm really just shooting in the dark here Smiley Happy

Stop by my blog if you'd like 🙂 I dabble in vSphere troubleshooting, PowerCLI scripting and NetApp storage - and I share my journeys at http://vmxp.wordpress.com/
Reply
0 Kudos