marius1
Enthusiast
Enthusiast

vCPUs and cores

When creating a new VM I can set the number of vCPUs and cores.
Given the numver of sockets I can assign to a given VM (let's say, 4), which is the best practice for a Windows Server VM?

  • 2 vCPUs with 2 cores each?
  • 4 vCPUs with core each one?
  • 1 vCPU with 4 cores?

Is it the same for Linux based guests?
marius

0 Kudos
1 Reply
vbondzio
VMware Employee
VMware Employee

As many cores per socket as necessary to replicate the underlying HW the vCPUs are scheduled on, that usually means as many cores (or threads) as are in a socket / NUMA node (depending on VM / HW size).

Longer explanation here: https://communities.vmware.com/t5/ESXi-Discussions/cores-vs-sockets-disks-vs-controllers/m-p/2829364...

Yes, same for Linux guests (even more so since Linux is using a relationship scheduler that takes that information into account).