numa(7)

๐Ÿ’– numa(7) โ€” the NUMA glow-up bestie edition ๐Ÿ’–

okay so this is numa(7), from the Miscellaneous Information Manual section, and it's literally the overview of Non-Uniform Memory Architecture. grab a boba, we're doing memory topology ๐Ÿง‹โœจ


๐ŸŒˆ NAME ๐ŸŒˆ

numa โ€” an overview of Non-Uniform Memory Architecture, no cap ๐Ÿ’…


๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

so Non-Uniform Memory Access (NUMA) is what we call multiprocessor systems whose memory is divided into multiple memory nodes. the access time of a memory node depends on the relative locations of the accessing CPU and the accessed node. (this is giving very much not like a symmetric multiprocessor system, where the access time for all of the memory is the same for all CPUs, periodt.) normally, each CPU on a NUMA system has a local memory node whose contents can be accessed faster than the memory in the node local to another CPU, or the memory on a bus shared by all CPUs. iconic architecture behaviour honestly ๐Ÿ”ฅ

โœจ NUMA system calls โœจ

the Linux kernel implements the following NUMA-related system calls: get_mempolicy(2), mbind(2), migrate_pages(2), move_pages(2), and set_mempolicy(2). HOWEVER โ€” and this is the important part, bestie โ€” applications should normally use the interface provided by libnuma; see "Library Support" below. don't be a main character about it ๐Ÿ™ˆ

๐Ÿ“ /proc/pid/numa_maps (since Linux 2.6.14) ๐Ÿ“

this file displays information about a process's NUMA memory policy and allocation. it's giving very transparent, very see-through ๐Ÿซถ

each line contains information about a memory range used by the process, displaying โ€” among other information โ€” the effective memory policy for that memory range and on which nodes the pages have been allocated.

numa_maps is a read-only file. when /proc/pid/numa_maps is read, the kernel will scan the virtual address space of the process and report how memory is used. one line is displayed for each unique memory range of the process.

the first field of each line shows the starting address of the memory range. this field allows a correlation with the contents of the /proc/pid/maps file, which contains the end address of the range and other information, such as the access permissions and sharing.

the second field shows the memory policy currently in effect for the memory range. โš ๏ธ note that the effective policy is not necessarily the policy installed by the process for that memory range. specifically, if the process installed a "default" policy for that range, the effective policy for that range will be the process policy, which may or may not be "default". (yes the vibes can differ from the receipts, that's just how it is ๐Ÿ˜ญ)

the rest of the line contains information about the pages allocated in the memory range, as follows:

  • N<node>=<nr_pages> โ€” the number of pages allocated on <node>. <nr_pages> includes only pages currently mapped by the process. page migration and memory reclaim may have temporarily unmapped pages associated with this memory range. these pages may show up again only after the process has attempted to reference them. if the memory range represents a shared memory area or file mapping, other processes may currently have additional pages mapped in a corresponding memory range. (they said "it's complicated" ๐Ÿ’€)
  • file=<filename> โ€” the file backing the memory range. if the file is mapped as private, write accesses may have generated COW (Copy-On-Write) pages in this memory range. these pages are displayed as anonymous pages.
  • heap โ€” memory range is used for the heap.
  • stack โ€” memory range is used for the stack.
  • huge โ€” huge memory range. the page counts shown are huge pages and not regular sized pages. big girl pages only ๐Ÿ‘‘
  • anon=<pages> โ€” the number of anonymous page in the range.
  • dirty=<pages> โ€” number of dirty pages. messy fr fr ๐Ÿซง
  • mapped=<pages> โ€” total number of mapped pages, if different from dirty and anon pages.
  • mapmax=<count> โ€” maximum mapcount (number of processes mapping a single page) encountered during the scan. this may be used as an indicator of the degree of sharing occurring in a given memory range. sharing is caring but the count knows ๐ŸŒธ
  • swapcache=<count> โ€” number of pages that have an associated entry on a swap device.
  • active=<pages> โ€” the number of pages on the active list. this field is shown only if different from the number of pages in this range. this means that some inactive pages exist in the memory range that may be removed from memory by the swapper soon. they're on thin ice bestie โณ
  • writeback=<pages> โ€” number of pages that are currently being written out to disk. they're on their way, in transit, no follow-ups needed ๐Ÿฆ‹

โญ STANDARDS โญ

None. (not a single one. it's giving mysterious ๐ŸŽ€)


๐Ÿ’œ NOTES ๐Ÿ’œ

the Linux NUMA system calls and /proc interface are available only if the kernel was configured and built with the CONFIG_NUMA option. no config, no vibes ๐Ÿ’…

๐Ÿงš Library support ๐Ÿงš

link with -lnuma to get the system call definitions. libnuma and the required <numaif.h> header are available in the numactl package.

however, applications should not use these system calls directly. instead, the higher level interface provided by the numa(3) functions in the numactl package is recommended. don't go raw into the syscalls, use the nice wrapper, i'm begging ๐Ÿฅบ

the numactl package is available at ftp://oss.sgi.com/www/projects/libnuma/download/. the package is also included in some Linux distributions. some distributions include the development library and header in the separate numactl-devel package. check your distro, iykyk ๐Ÿ“ฆโœจ


๐ŸŽ€ SEE ALSO ๐ŸŽ€

get_mempolicy(2), mbind(2), move_pages(2), set_mempolicy(2), numa(3), cpuset(7), numactl(8)


and that's the whole page, bestie ๐Ÿ’– this one came from the Linux man-pages 6.20, dated 2026-02-08, and it's the numa(7) page from the Miscellaneous Information Manual. go forth and be NUMA-aware, you absolute icon ๐ŸŒˆ๐Ÿ‘‘โœจ

๐Ÿ“ฆ where this page comes from
  • arch rolling: man-pages 6.20-1 ยท BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
  • nixpkgs unstable: man-pages 6.20
  • ๐Ÿ“œ the page's license: Linux-man-pages-copyleft
  • ๐Ÿ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms