Cores Per Socket Best Practices for VMs

Wallace, Glenn 20 Reputation points
2025-07-22T19:08:33.1466667+00:00

Hello,

What configuration offers better performance for SQL Server Enterprise Edition Running on virtual machines like VMWare: multiple sockets with one core each (e.g., 8 sockets, 1 core per socket) or a multi-core setup (e.g., 1 socket, 8 cores)? Additionally, any documentation or whitepapers discussing the best options for these configurations would be greatly appreciated.

SQL Server Database Engine
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Marcin Policht 53,675 Reputation points MVP Volunteer Moderator
    2025-07-22T19:30:42.8466667+00:00

    AFAIK, a multi-core per socket configuration (e.g., 1 socket, 8 cores) typically offers better performance than multiple sockets with one core each (e.g., 8 sockets, 1 core per socket). There are several reasons for it:

    1. NUMA efficiency: SQL Server is NUMA-aware. A lower socket count (with more cores per socket) usually means fewer NUMA nodes, reducing cross-node memory access latency and improving scalability.
    2. VMware CPU scheduling: vSphere has to co-schedule vCPUs of the same socket simultaneously. Fewer virtual sockets (with multiple cores per socket) reduce the complexity of vCPU scheduling and can reduce ready times (when vCPUs are ready to run but not scheduled).
    3. Licensing simplification: SQL Server Enterprise Edition is licensed per core, not per socket, so there's no licensing benefit to using more sockets with fewer cores.
    4. Hypervisor optimization: Hypervisors like VMware ESXi are optimized for multi-core socket configurations. Configuring many sockets with single cores increases CPU overhead and reduces cache locality benefits.

    Multiple Sockets with one core each tend to create more NUMA nodes. This increases memory access latency, vCPU scheduling constraints, and virtual hardware overhead. It also offers no benefit in SQL Server performance or licensing.

    Regarding documentation, try https://www.vmware.com/content/dam/digitalmarketing/vmware/en/pdf/solutions/sql-server-on-vmware-best-practices-guide.pdf and https://learn.microsoft.com/en-us/azure/azure-sql/virtual-machines/windows/performance-guidelines-best-practices-vm-size


    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin

    0 comments No comments

  2. Ben Miller-(DBADuck) 195 Reputation points MVP
    2025-07-29T14:39:32.8133333+00:00

    There is clear guidance in the VMWare best practices. Easy answer is this.

    If you are < 8 cores, then 1 socket 8 cores (or 2 or 4 or 6 or 8) but 1 socket 8 cores.

    If you are > 8 cores then you use sockets that match the NUMA of the host. So if the VM Host is 2 sockets and 16 cores each, then you would match the sockets and then divide the cores in half.

    Example: I want 12 cores in my VM, host is 2 x 16 cores

    Put 2 sockets and 6 cores per socket in the VM so it matches the NUMA and has a division of cores.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.