ELI5: 1 socket with 4 cores or 2 sockets with 2 cores each?

Excluding licencing, is there any difference what so ever?

View Reddit by ta4esxiView Source


To see the full content, share this page by clicking one of the buttons below

Related Articles


  1. In theory, yes, but not in the typical case. This makes a difference in how the topology of the underlying hardware is presented to the VM. The VM sometimes makes decisions about memory locality (NUMA) based on the topology of the hardware as it sees it. However, until you get to a VM size that exceeds the NUMA boundary on the host machine, VMware won’t present vNUMA information to the guest, so it won’t matter. The hypervisor makes decisions about where to place the guest in terms of CPU and memory so there isn’t any unneeded latency. However, once you breach the NUMA boundary (called a “wide VM” in VMware terms), then that information will be passed through to the guest OS so it can make more intelligent decisions about how to allocate memory.

    Unless you are hitting a number of vCPUs that is larger than what your host physically has on a single socket, it’s best to let VMware handle this for you and just set the number of cores. If you need to change it due to licensing requirements, then you can do that with no issues, but I think the use cases for that kind of thing are declining as software vendors now tend to license by cores more than by socket these days. (With socket licensing covering any number of VMs.)

  2. VMware changed how the vSocket works with ESXi starting with 6.5. Now what it does is tells the guest how L3 Cache should be accessed since L3 is shared between sockets. VMware engineering advised me to never use vSockets unless it was a ‘in guest’ licensing reason since they do a lot more locality awareness under the hood on ESXi’s scheduler and took the access layers mostly out of the guest OS’s topology. Personally I have tested this a lot and have not see any performance gains/losses from either using or not using virtual sockets so its entirely possible VMware engineering is correct in this now.

  3. Practically speaking, there typically isn’t a difference, as everything gets executed on the same physical core, anyhow. There are some older OSes and databases (from 10+ years ago) that will see a performance difference – for some reason I remember Oracle being one, but I’d be glad to be corrected.

    This had less to do with CPUs for the OS, than it did the application being coded to run differently to take advantage of the CPU caching differences between multi-socket low-core processor servers vs multi-core single-socket processors. Again, this was all a long time ago, so I’m pretty sure any performance differences have all been lost to time and the Core Wars.

    edit: formatting

    Edit: Edit: I just realized that some hypervisor hosts might be total beasts with multiple 10-core sockets, and could pass those through to the guest OS via vCPUs. I’m ignorant of any performance differences at that level of performance, as I’ve not seen such a configuration.

  4. Really it comes down to NUMA. If you have a 2CPU system each with 4 cores and a total of 384 Gigs of RAM. Each CPU has direct access to 192 GB. If you do a vm that is 4×1 vCPU configuration and 256GB of ram than you’ll get memory latency when using the upper 64GB of ram since it’s on the other CPU. If you did a 2×2 vCPU configuration than the scheduclar can manage the resources better.

Leave a Reply