VMware Cloud Community
MikeErter
Enthusiast
Enthusiast

How to run all vCPUS on a single NUMA node?

Hi VMware community,

There is a lot online about the subject of VMware and NUMA, but it isn't entirely clear to me how to configure a multi-vCPU virtual machine so that all its vCPUS run on the same physical NUMA node.


How is this done?

This is on ESXi 5.5.


Thanks a lot!

0 Kudos
3 Replies
rcporto
Leadership
Leadership

Check if helps: Associate Virtual Machines with Specified NUMA Nodes in the vSphere Web Client

---

Richardson Porto
Senior Infrastructure Specialist
LinkedIn: http://linkedin.com/in/richardsonporto
0 Kudos
vfk
Expert
Expert

There following article are quite helpful.

The Importance of VM Size to NUMA Node Size | VMware vSphere Blog - VMware Blogs

Checking the vNUMA Topology | VMware vSphere Blog - VMware Blogs

--- If you found this or any other answer helpful, please consider the use of the Helpful or Correct buttons to award points. vfk Systems Manager / Technical Architect VCP5-DCV, VCAP5-DCA, vExpert, ITILv3, CCNA, MCP
0 Kudos
vNEX
Expert
Expert

Hello Mike,

as refference use this guide:

http://www.vmware.com/pdf/Perf_Best_Practices_vSphere5.5.pdf

I just extracted some of the technical recommendations from docs which I hope will help you with resource setup questions.

I would recommend you to leave all the work on ESXi itself and its NUMA scheduler first thing you can always do is properly size your VMs see below.

So I suggest to leave all the affinity (CPU, NUMA) options behind unless you must use them in some rare and extreme circumstances...

Size your virtual machines so they align with physical NUMA boundaries. For example, if you have a host  system with six cores per NUMA node, size your virtual machines with a multiple of six vCPUs (i.e., 6vCPUs, 12 vCPUs, 18 vCPUs, 24 vCPUs, and so on).

The NUMA scheduling and memory placement policies in ESXi can manage all virtual machines transparently, so that administrators do not need to address the complexity of balancing virtual machines between nodes explicitly.

vSphere 5.5 Documentation Center

ESXi uses a sophisticated NUMA scheduler to dynamically balance processor load and memory locality or processor load balance.

1. Each virtual machine managed by the NUMA scheduler is assigned a home node. A home node is one of the system’s NUMA nodes containing processors and local memory, as   indicated by the System Resource Allocation Table (SRAT).

2. When memory is allocated to a virtual machine, the ESXi host preferentially allocates it from the home node. The virtual CPUs of the virtual machine are constrained   to run on the home node to maximize memory locality.

3. The NUMA scheduler can dynamically change a virtual machine's home node to respond to changes in system load. The scheduler might migrate a virtual machine to a new   home node to reduce processor load imbalance.

Because this might cause more of its memory to be remote, the scheduler might migrate the virtual machine’s memory   dynamically to its new home node to improve memory locality.

The NUMA scheduler might also swap virtual machines between nodes when this improves overall memory   locality.

Perf_Best_Practices_vSphere5.5

(page 22)

NUMA

The intelligent, adaptive NUMA scheduling and memory placement policies in ESXi can manage all virtual

machines transparently, so that administrators don’t need to deal with the complexity of balancing virtual

machines between nodes by hand.

Manual controls are available to override this default behavior, however, and advanced administrators might prefer

to manually set NUMA placement (through the numa.nodeAffinity advanced option).

By default, ESXi NUMA scheduling and related optimizations are enabled only on systems with a total of at least four CPU cores and with at least two CPU cores per NUMA node.

(page 44)

vNUMA

When creating a virtual machine you have the option to specify the number of virtual sockets and the

number of cores per virtual socket. In general, we recommend leaving this at the default value of 1 core

per socket (with the number of virtual sockets therefore equal to the number of vCPUs).

If the number of cores per virtual socket on a vNUMA-enabled virtual machine is set to any value other

than the default of 1, and that value doesn't align with the underlying physical host topology, performance

might be slightly reduced. Therefore if a virtual machine is to be configured with a non-default number

of cores per virtual socket, for best performance that number should be an integer multiple or integer

divisor of the physical NUMA node size.

In some cases, setting the number of cores per virtual socket to the number of cores per physical NUMA

node shows a performance improvement.

- By default, vNUMA is enabled only for virtual machines with more than eight vCPUs

_______________________________________________________________________________________

If you found this or any other answer helpful, please consider to award points. (use Helpful or Correct buttons)

Regards,

P.

_________________________________________________________________________________________ If you found this or any other answer helpful, please consider to award points. (use Correct or Helpful buttons) Regards, P.
0 Kudos