25.12. Configuring NUMA policies using systemd
Non-uniform memory access (NUMA) is a computer memory subsystem design, in which the memory access time depends on the physical memory location relative to the processor.
Memory close to the CPU has lower latency (local memory) than memory that is local for a different CPU (foreign memory) or is shared between a set of CPUs.
In terms of the Linux kernel, NUMA policy governs where (for example, on which NUMA nodes) the kernel allocates physical memory pages for the process.
systemd provides unit file options NUMAPolicy and NUMAMask to control memory allocation policies for services.
When you configure a strict NUMA policy, for example bind, make sure that you also appropriately set the CPUAffinity= unit file option.
Procedure
Set the NUMA memory policy through the
NUMAPolicyunit file option:Check the values of the
NUMAPolicyunit file option in the service of your choice:$ systemctl show --property <NUMA policy configuration option> <service name>As a root, set the required policy type of the
NUMAPolicyunit file option:# systemctl set-property <service name> NUMAPolicy=<value>Restart the service to apply the changes:
# systemctl restart <service name>
Set a global
NUMAPolicysetting using the[Manager]configuration option:-
Search in the
/etc/systemd/system.conffile for theNUMAPolicyoption in the[Manager]section of the file. - Edit the policy type and save the file.
Reload the
systemdconfiguration:# systemd daemon-reload- Reboot the server.
-
Search in the