numad(8)

๐Ÿ“ฆ
version 0.5+20251104 ยท 3 versions
, in debian bookworm, debian trixie, fedora 44, nixos 26.05, nixpkgs unstable, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

๐Ÿ’– numad(8) โ€” the manual page, but make it slay โœจ

okay bestie, sit DOWN because we're talking about numad(8) โ€” a whole user-level daemon that hands out placement advice and does process management so your CPUs and memory on NUMA-topology systems actually get used efficiently. it's giving matchmaker but for threads and nodes. ๐ŸŽ€


โœจ NAME โœจ

numad โ€” A user-level daemon that provides placement advice and process management for efficient use of CPUs and memory on systems with NUMA topology.


๐ŸŒธ SYNOPSIS ๐ŸŒธ

numad [-dhvV]

numad [-C 0|1]

numad [-H THP_hugepage_scan_sleep_ms]

numad [-i [min_interval:]max_interval]

numad [-K 0|1]

numad [-l log_level]

numad [-m target_memory_locality]

numad [-p PID]

numad [-r PID]

numad [-R reserved-CPU-list]

numad [-S 0|1]

numad [-t logical_CPU_percent]

numad [-u target_utilization]

numad [-w NCPUS[:MB]]

numad [-x PID]

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

so. Numad is a system daemon that keeps an eye on your NUMA topology and your resource usage, like a nosy bestie but in a helpful way. ๐Ÿ’… It will try to locate processes so they get efficient NUMA locality and affinity, and it dynamically adjusts to changing system conditions โ€” yes, it adapts, main character behavior fr.

It also hands out guidance to help management applications do their initial manual binding of CPU and memory resources for their processes. so it's not just doing the work, it's also telling you how to do the work. iconic.

heads up bestie: numad is primarily intended for server consolidation environments, where there might be multiple applications or multiple virtual guests running on the same server system. ๐Ÿซถ

Numad is most likely to have a positive effect when processes can be localized in a subset of the system's NUMA nodes. But if the entire system is dedicated to a large in-memory database application, for example โ€” especially if memory accesses will likely remain unpredictable โ€” numad will probably not improve performance. not every problem needs a daemon, and that's okay. ๐Ÿ˜ญ


๐Ÿ‘‘ OPTIONS ๐Ÿ‘‘

one bullet per flag, no skips, no cap. every single one is here. ๐Ÿงš

  • -C <0|1> โ€” controls whether or not numad treats inactive file cache as available memory. by default, numad assumes it can count inactive file cache as "free" memory when it's considering resources to match with processes. specify -C 0 if you want numad to instead consider inactive file cache as a consumed resource.
  • -d โ€” debug output in log, sets the log level to LOG_DEBUG. same effect as -l 7. it's the loud version. ๐Ÿ”ฅ
  • -h โ€” display usage help information and then exit. the classic "help me" flag, we love her.
  • -H <THP_scan_sleep_ms> โ€” set the desired transparent hugepage scan interval in ms. the /sys/kernel/mm/tranparent_hugepage/khugepaged/scan_sleep_millisecs tunable is usually set to 10000ms by the operating system. the default is changed by numad to be 1000ms since it is helpful for the hugepage daemon to be more aggressive when memory moves between nodes. specifying (-H 0) will cause numad to retain the system default value. you can also make the hugepage daemon more or less aggressive by specifying an alternate value with this option. for example, setting this value to 100ms (-H 100) might improve the performance of workloads which use many transparent hugepages. โœจ
  • -i <[min_interval:]max_interval> โ€” sets the time interval that numad waits between system scans, in seconds to <max_interval>. default <max_interval> is 15 seconds, default <min_interval> is 5 seconds. setting a <max_interval> of zero will cause the daemon to exit. (this is the normal mechanism to terminate the daemon. ๐Ÿซก) a bigger <max_interval> will decrease numad overhead but also decrease responsiveness to changing loads. the default numad max_interval can be changed in the numad.conf file.
  • -K <0|1> โ€” this option controls whether numad keeps interleaved memory spread across NUMA nodes, or attempts to merge interleaved memory to local NUMA nodes. the default is to merge interleaved memory. this is the appropriate setting to localize processes in a subset of the system's NUMA nodes. if you are running a large, single-instance application that allocates interleaved memory because the workload will have continuous unpredictable memory access patterns (e.g. a large in-memory database), you might get better results by specifying -K 1 to instruct numad to keep interleaved memory distributed.
  • -l <log_level> โ€” sets the log level to <log_level>. reasonable choices are 5, 6, or 7. the default value is 5. note that CPU values are scaled by a factor of 100 internally and in the numad log files. unfortunately, you don't actually have that many CPUs. ๐Ÿ˜ญ๐Ÿ’€
  • -m <target_memory_locality> โ€” set the desired memory locality threshold to stop moving process memory. numad might stop retrying to coalesce process memory when more than this percentage of the process's memory is already localized in the target node(s). the default is 90%. numad will frequently localize more than the localization threshold percent, but it will not necessarily do so. decrease the threshold to allow numad to leave more process memory distributed on various nodes. increase the threshold to instruct numad to try to localize more memory. acceptable values are between 50 and 100 percent. note that setting the target memory locality to 100% might cause numad to continually retry to move memory that the kernel will never successfully move. ๐Ÿšจ
  • -p <PID> โ€” add PID to explicit inclusion list of processes to consider for managing, if the process also uses significant resources. multiple -p PID options can be specified at daemon start, but after daemon start, only one PID can be added to the inclusion list per subsequent numad invocation. use with -S to precisely control the scope of processes numad can manage. note that the specified process will not necessarily be actively managed unless it also meets numad's significance threshold โ€” which is currently 300MB and half of a CPU. ๐Ÿ˜ฎโ€๐Ÿ’จ
  • -r <PID> โ€” remove PID from both the explicit inclusion and the exclusion lists of processes. after daemon start, only one PID can be removed from the explicit process lists per subsequent numad invocation. use with -S and -p and -x to precisely control the scope of processes numad can manage. it's the undo button, basically. ๐ŸŽ€
  • -R <CPU_LIST> โ€” specify a list of CPUs that numad should assume are reserved for non-numad use. no processes will be bound to the specified CPUs by numad. this option is effective only when starting numad. you cannot change reserved CPUs dynamically while numad is already running. no take-backsies. ๐Ÿ™ˆ
  • -S <0|1> โ€” this option controls whether numad scans all system processes or only the processes on the explicit inclusion PID list. the default is to scan all processes. use -S 0 to scan only the explicit inclusion PID list. use -S 1 to again scan all system processes (excepting those on the explicit exclusion list). starting numad as
numad -S 0 -p <PID-1> -p <PID-2> -p <PID-3>

will limit scanning, and thus also automatic NUMA management, to only those three explicitly specified processes. three little icons, only them. ๐Ÿ‘‘

  • -t <logical_CPU_percent> โ€” specify the resource value of logical CPUs. hardware threads typically share most core resources, and so logical CPUs add only a fraction of CPU power for many workloads. by default numad considers logical CPUs to be only 20 percent of a dedicated hardware core.
  • -u <target_utilization> โ€” set the desired maximum consumption percentage of a node. default is 85%. decrease the target value to maintain more available resource margin on each node. increase the target value to more exhaustively consume node resources. if you have sized your workloads to precisely fit inside a NUMA node, specifying (-u 100) might improve system performance by telling numad to go ahead and consume all the resources in each node. it is possible to specify values up to 130 percent to oversubscribe CPUs in the nodes, but memory utilization is always capped at 100%. use oversubscription values very carefully. โš ๏ธ
  • -v โ€” verbose output in log, sets the log level to LOG_INFO. same effect as -l 6.
  • -V โ€” display version information and exit. the "who am i" flag. ๐Ÿ’…
  • -w <NCPUS[:MB]> โ€” queries numad for the best NUMA nodes to bind an entity that needs <NCPUS>. the amount of memory (in MBs) is optional, but should normally be specified as well <:MB> so numad can recommend NUMA nodes with available CPU capacity and adequate free memory. this query option can be used regardless of whether numad is running as a daemon. (an invocation using this option when numad is not running as a daemon, will not cause the daemon to start.) output of this option is a string that contains a NUMA node list. for example: 2-3,6. the recommended node list could be saved in a shell variable (e.g., NODES) and then used as the node list parameter in a
numactl -m $NODES -N $NODES ...

command. see numactl(8). this one is genuinely so useful, iykyk. ๐ŸŒˆ

  • -x <PID> โ€” add PID to explicit exclusion list of processes to blacklist from managing. multiple -x PID options can be specified at daemon start, but after daemon start, only one PID can be added to the exclusion list per subsequent numad invocation. use with -S to precisely control the scope of processes numad can manage. it's the block button. ๐Ÿšซ

๐ŸŽ€ FILES ๐ŸŽ€

  • /usr/bin/numad
  • /etc/numad.conf
  • /var/log/numad.log
  • /var/run/numad.pid

๐ŸŒˆ ENVIRONMENT VARIABLES ๐ŸŒˆ

None. that's it. nothing. empty. the void. โœจ


๐Ÿ’œ EXAMPLES ๐Ÿ’œ

Numad can be run as a system daemon and can be managed by the standard init mechanisms of the host. very hands-off, very self-sufficient, very main character. ๐Ÿฆ‹

if interactive (manual) control is desired, you can start the daemon manually by typing:

/usr/bin/numad

subsequent numad invocations while the daemon is running can be used to dynamically change most run-time options. it's basically a group chat with the daemon. ๐Ÿ“ฑ

you can terminate numad from running by typing:

/usr/bin/numad -i0

and that's the whole goodbye. periodt. ๐Ÿ’…


โญ AUTHORS โญ

Bill Gray <bgray@redhat.com> โ€” the legend behind all this. bow down. ๐Ÿ‘‘


๐ŸŒธ SEE ALSO ๐ŸŒธ


and that's the vibe check, bestie ๐Ÿซถ this whole page is version 1.0.0, brought to you by Bill Gray, and yeah โ€” the manual name is numad(8), in case you forgot. go forth and localize your memory. ๐Ÿงš๐Ÿ’–