Red Hat Training

A Red Hat training course is available for Red Hat Enterprise Linux

A.13. numad

numad is an automatic NUMA affinity management daemon. It monitors NUMA topology and resource usage within a system in order to dynamically improve NUMA resource allocation and management.
Note that when numad is enabled, its behavior overrides the default behavior of automatic NUMA balancing.

A.13.1. Using numad from the Command Line

To use numad as an executable, just run:
# numad
While numad runs, its activities are logged in /var/log/numad.log. It will run until stopped with the following command:
# numad -i 0
Stopping numad does not remove the changes it has made to improve NUMA affinity. If system use changes significantly, running numad again will adjust affinity to improve performance under the new conditions.
To restrict numad management to a specific process, start it with the following options.
# numad -S 0 -p pid
-p pid
This option adds the specified pid to an explicit inclusion list. The process specified will not be managed until it meets the numad process significance threshold.
-S 0
This sets the type of process scanning to 0, which limits numad management to explicitly included processes.
For further information about available numad options, refer to the numad man page:
$ man numad

A.13.2. Using numad as a Service

While numad runs as a service, it attempts to tune the system dynamically based on the current system workload. Its activities are logged in /var/log/numad.log.
To start the service, run:
# systemctl start numad.service
To make the service persist across reboots, run:
# chkconfig numad on
For further information about available numad options, refer to the numad man page:
$ man numad

A.13.3. Pre-Placement Advice

numad provides a pre-placement advice service that can be queried by various job management systems to provide assistance with the initial binding of CPU and memory resources for their processes. This pre-placement advice is available regardless of whether numad is running as an executable or a service.

A.13.4. Using numad with KSM

If KSM is in use on a NUMA system, change the value of the /sys/kernel/mm/ksm/merge_nodes parameter to 0 to avoid merging pages across NUMA nodes. Otherwise, KSM increases remote memory accesses as it merges pages across nodes. Furthermore, kernel memory accounting statistics can eventually contradict each other after large amounts of cross-node merging. As such, numad can become confused about the correct amounts and locations of available memory, after the KSM daemon merges many memory pages. KSM is beneficial only if you are overcommitting the memory on your system. If your system has sufficient free memory, you may achieve higher performance by turning off and disabling the KSM daemon.