You can specify that all future memory allocations on a virtual machine use pages associated with a single NUMA node (also known as manual memory affinity). When the virtual machine uses local memory, the performance improves on that virtual machine.

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

Using a vSphere Client, right-click a virtual machine and select Edit Settings.

2

In the Virtual Machine Properties dialog box, 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.