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).

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.

1

In the vSphere Client, right-click the virtual machine in the inventory and select Edit Settings.

2

Select the Resources tab, and select Memory.

3

In the NUMA Memory Affinity panel, set memory affinity.

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 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 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 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 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.