Installation guide

C H A P T E R 1 2 VMware ESX Server Resource Management
423
Example of Binding a Virtual Machine to a Single NUMA Node on an 8-way
Server
The following example illustrates manually binding four CPUs to a single NUMA node
for a virtual machine. In the example, we want this virtual machine to run only on
node 1.
An example output of cat /proc/vmware/NUMA/hardware is:
The CPUs — for example, 4, 5, 6 and 7 — are the physical CPU numbers.
1. Complete one of the following to bind a two-way virtual machine to use only
the last four physical CPUs of an eight-processor machine:
Add the following in the virtual machine’s configuration file.
sched.cpu.affinity = 4,5,6,7
In the VMware Management Interface, associate a virtual machine to a single
NUMA node by checking the appropriate boxes next to Run on Processor(s)
in the CPU tab of the virtual machine details page.
2. Set the virtual machine’s memory affinity to specify that all of the virtual
machine’s memory should be allocated on node 1.
Add the following in the virtual machine’s configuration file.
sched.mem.affinity = 1
Completing these two steps ensure that the virtual machine runs only on NUMA node
1 and, when possible, allocates memory from the same node.
System type : IBM x440-compatible
# NUMA Nodes : 2
Total memory : 14336 MB
Node ID MachineMem ManagedMem CPUs
0 00 4096 MB 1210 MB 0 1 2 3
1 01 10240 MB 6143 MB 4 5 6 7