VM topology can be defined:
- To use a NUMA node and huge pages. Example:
TOPOLOGY = [ NODE_AFFINITY = 0, HUGEPAGE_SIZE = 2 ]
- To use huge pages without specifying the NUMA node. Example:
TOPOLOGY = [ HUGEPAGE_SIZE = 2 ]
In any case OpenNebula will:
- look (or check) for a NUMA node with enough free huge pages
- will pick the NUMA node with more free pages (if no NUMA node is specified)
- configure the VM with CPU affinity to the selected NUMA node
(cherry picked from commit 1b3b88ed4e)
* NODE_AFFINITY can be used to pin a VM to all the CPUs of a NUMA node.
The attribute is part of the TOPOLOGY definition.
* A default virtual topology is defined when no other is set. This
allows to set only the affinity:
TOPOLOGY = [ NODE_AFFINITY = 1 ]
* NODE_AFFINITY can only be set for not-pinned VMs to not conflict with
core allocations for pin VMs. VMs with NODE_AFFINITY set will be
allocated to regular hosts (i.e. PIN_POLICY = NONE)
(cherry picked from commit fc15d6ebc9)