VMware Cloud Community
NickSousa
Contributor
Contributor

Odd Numbered vCPUs

Is there any technical reason why you shouldn't configure a VM with 3/5/7/9 vCPU's, as long as each vCPU is on its own socket?

0 Kudos
1 Reply
Alistar
Expert
Expert

Hi there,

the technical limitations will start to apply once you exceed a NUMA Node capacity by total vCPUs. Let's say you have a dual-socket, 4 core physical CPUs inside your servers (= 2 NUMA Nodes), so you have 8 total available physical cores. Configuring one VM with 3 vCPUs will be fine - corepersocket does not matter, ESXi tries to keep the workload on a single processor unless you have more than 4 cores (or n cores, where n is the number of physical, non-hyperthreaded cores on one physical CPU). Now let's say you configure it with 5 or 7 cores. This is where a problem starts to emerge, because you will have NUMA imbalance on your VM. 2 vCPUs will be running on NUMA Node 0 while 3 vCPUs will be running on NUMA Node 1 - this effectively affects processor cache hits (2 physical CPUs hitting cache vs 3 physical CPUs hitting cache) the local and non-local memory access ratio (ESXi splits the memory evenly between NUMA nodes, so you will have 2 CPUs accessing one half, and 3 vCPUs accessing the second half - not ideal), and impacts the memory access speed and latency.

I hope I shined a fair amount of light on this issue. Cheers!

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/
0 Kudos