virsh numatune --nodeset does not work
Environment
- Red Hat Enterprise Linux(RHEL) 6
- Red Hat Enterprise Linux(RHEL) 7
Issue
Enlarging the NUMA nodes for a running VM does not get respected by the qemu process, although the cgroups are changed accordingly
Resolution
- This issue has been fixed with Errata RHBA-2015:1252-3
Root Cause
NUMA membind call is done once the VM starts, so later cgroup changes do not take any effect extending the available NUMA zones
Diagnostic Steps
1) Disable swapping
swapoff -a
2) Create a VM with strict access to only one NUMA node.
<numatune>
<memory mode='strict' nodeset='0'/>
</numatune>
Initial memory should fit in the NUMA node, but max memory should span 2 nodes
<memory unit='KiB'>10485760</memory>
<currentMemory unit='KiB'>1048576</currentMemory>
3) Start the VM
4) Change the NUMA nodes to 0-1 and increase the memory of the VM to span 1+ NUMA node
virsh numatune vmname --nodeset 0-1
virsh setmem vmname 10485760K
5) Run a memory consuming program in the VM, so that it consumes more memory than one NUMA node has
Actual results:
The VM gets killed by OoM killer as it reaches the boundary of one NUMA node
Expected results:
The VM should allocate memory from the second NUMA node as well as it should be able to do so.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
