Specifications

VMware, Inc. 363
Chapter 12 VMware ESX Server Resource Management
! procfs!interface!on!the!service!console:
/proc/vmware/vm/<id>/mem/affinity
Write!the!number!of!the!NUMA!node.
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.!You!want!the!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.
To manually bind four CPUs to a single NUMA node for a virtual machine
1Complete!one!of!the!following
!to!bind!a!twoway!virtual!machine!to!use!only!the!
last!four!physical!CPUs!of!an!eightprocessor!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.
2Set!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!ensures!that!the!virtual!machine!runs!only!on!NUMA!node!
1!and,!when!possible,!allocates!memory!from!the!same!node.
Sizing Memory on the Server
These!guidelines!are!to!help!system!administrators!determine!an!appropriate!amount!
of!hardware!memory!for!running!a!virtual!machine!workload!on!ESX!Server!2.5.!
Because!the!characteristics!of!your!workload!also!influence!memory!needs,!follow!up!
#!NUMA!Nodes:!2
Total!memory:!14336!MB
Node ID MachineMem ManagedMe
m
CPUs
000 4096!MB 1210!MB 0!1!2!3
1 01 10240!MB 6143!MB 4!5!6!7