You can specify that all future memory allocations on a virtual machine use pages associated with specific NUMA nodes (also known as manual memory affinity).

About this task

Note:

Specify nodes to be used for future memory allocations only if you have also specified CPU affinity. If you make manual changes only to the memory affinity settings, automatic NUMA rebalancing does not work properly.

Procedure

  1. Browse to the virtual machine in the vSphere Web Client navigator.
  2. Click the Configure tab.
  3. Click Settings, and click VM Hardware.
  4. Click Edit.
  5. Select the Virtual Hardware tab, and expand Memory.
  6. Under NUMA Memory Affinity, set memory affinity.

Binding a Virtual Machine to a Single NUMA Node

The following example illustrates manually binding the last four physical CPUs to a single NUMA node for a two-way virtual machine on an eight-way server.

The CPUs (for example, 4, 5, 6, and 7) are the physical CPU numbers.

  1. In the vSphere Web Client navigator, right-click the virtual machine and select Edit Settings.

  2. Select Options and click Advanced.

  3. Click the Configuration Parameters button.

  4. In the vSphere Web Client, turn on CPU affinity for processors 4, 5, 6, and 7.

Then, you want this virtual machine to run only on node 1.

  1. In the vSphere Web Client inventory panel, select the virtual machine and select Edit Settings.

  2. Select Options and click Advanced.

  3. Click the Configuration Parameters button.

  4. In the vSphere Web Client, set memory affinity for the NUMA node to 1.

Completing these two tasks ensures that the virtual machine runs only on NUMA node 1 and, when possible, allocates memory from the same node.