Installation guide

C H A P T E R 1 2 VMware ESX Server Resource Management
421
There are two NUMA options you may set manually:
CPU affinity — See the following section.
Memory affinity — See Associating Future Virtual Machine Memory Allocations
with a NUMA Node on page 422.
Typically, to bind a virtual machine to a NUMA node, you should set the virtual
machine’s CPU affinity to use only the CPUs on the desired node, and set the NUMA
memory affinity to the same node.
Note: If you set these optimizations manually, then ESX Server does not
automatically “rebalance” the nodes if one node becomes overloaded. You must
balance the NUMA nodes to avoid overloading any single NUMA node.
Associating Virtual Machines to a Single NUMA Node
You can improve the performance of the applications on a virtual machine by
associating it to the CPU numbers on a single NUMA node (manual CPU affinity). (See
NUMA Configuration Information on page 418 for information on obtaining these
CPU numbers.)
VMware Management Interface — Associate a virtual machine to a single NUMA
node. Click Edit in the Scheduling Affinity section of the CPU page for the
virtual machine. Then click the appropriate choices next to Run on Processor(s)
and Do not Run on Processor(s). Click OK.
See Managing CPU Resources from the Management Interface on page 394 for
additional information.
Virtual machine configuration file — Add the following:
sched.cpu.affinity = <set>
where <set> comprises CPU numbers on a single NUMA node. This entry binds
all virtual CPUs in this virtual machine to the NUMA node.
For example, typing sched.cpu.affinity = 4,5,6,7 binds this virtual
machine to the NUMA node that has physical CPUs 4 through 7.
See Editing the Virtual Machine Configuration File on page 395 for additional
information on this entry.
procfs interface on the service console
/proc/vmware/vm/<id>/cpu/affinity
Write a comma-separated list of the CPU numbers on a single NUMA node. See
Using procfs on page 397 for additional information on this entry.