NUMA is a technology that allows the system memory to be divided into zones, also named nodes. The NUMA nodes are then allocated to particular CPUs or sockets. In contrast to the traditional monolithic memory approach, where each CPU/core can access all the memory regardless of its locality, usually resulting in larger latencies, NUMA bound processes can access memory that is local to the CPU they are being executed on. In most cases, this is much faster than the memory connected to the remote CPUs on the system.
Libvirt uses the
libnuma library to enable NUMA functionality for virtual machines, as we can see here:
root@kvm:~# ldd /usr/sbin/libvirtd | grep numa libnuma.so.1 => /usr/lib/x86_64-linux-gnu/libnuma.so.1 (0x00007fd12d49e000) root@kvm:~#
Libvirt NUMA supports the following memory allocation policies to place virtual machines to NUMA nodes:
- strict: The placement will fail if the memory cannot be allocated on the target node
- interleave: Memory pages are allocated...