1NUMA(7) Linux Programmer's Manual NUMA(7)
2
3
4
6 numa - overview of Non-Uniform Memory Architecture
7
9 Non-Uniform Memory Access (NUMA) refers to multiprocessor systems whose
10 memory is divided into multiple memory nodes. The access time of a
11 memory node depends on the relative locations of the accessing CPU and
12 the accessed node. (This contrasts with a symmetric multiprocessor
13 system, where the access time for all of the memory is the same for all
14 CPUs.) Normally, each CPU on a NUMA system has a local memory node
15 whose contents can be accessed faster than the memory in the node local
16 to another CPU or the memory on a bus shared by all CPUs.
17
18 NUMA system calls
19 The Linux kernel implements the following NUMA-related system calls:
20 get_mempolicy(2), mbind(2), migrate_pages(2), move_pages(2), and
21 set_mempolicy(2). However, applications should normally use the inter‐
22 face provided by libnuma; see "Library Support" below.
23
24 /proc/[number]/numa_maps (since Linux 2.6.14)
25 This file displays information about a process's NUMA memory policy and
26 allocation.
27
28 Each line contains information about a memory range used by the
29 process, displaying—among other information—the effective memory policy
30 for that memory range and on which nodes the pages have been allocated.
31
32 numa_maps is a read-only file. When /proc/<pid>/numa_maps is read, the
33 kernel will scan the virtual address space of the process and report
34 how memory is used. One line is displayed for each unique memory range
35 of the process.
36
37 The first field of each line shows the starting address of the memory
38 range. This field allows a correlation with the contents of the
39 /proc/<pid>/maps file, which contains the end address of the range and
40 other information, such as the access permissions and sharing.
41
42 The second field shows the memory policy currently in effect for the
43 memory range. Note that the effective policy is not necessarily the
44 policy installed by the process for that memory range. Specifically,
45 if the process installed a "default" policy for that range, the effec‐
46 tive policy for that range will be the process policy, which may or may
47 not be "default".
48
49 The rest of the line contains information about the pages allocated in
50 the memory range, as follows:
51
52 N<node>=<nr_pages>
53 The number of pages allocated on <node>. <nr_pages> includes
54 only pages currently mapped by the process. Page migration and
55 memory reclaim may have temporarily unmapped pages associated
56 with this memory range. These pages may show up again only af‐
57 ter the process has attempted to reference them. If the memory
58 range represents a shared memory area or file mapping, other
59 processes may currently have additional pages mapped in a corre‐
60 sponding memory range.
61
62 file=<filename>
63 The file backing the memory range. If the file is mapped as
64 private, write accesses may have generated COW (Copy-On-Write)
65 pages in this memory range. These pages are displayed as anony‐
66 mous pages.
67
68 heap Memory range is used for the heap.
69
70 stack Memory range is used for the stack.
71
72 huge Huge memory range. The page counts shown are huge pages and not
73 regular sized pages.
74
75 anon=<pages>
76 The number of anonymous page in the range.
77
78 dirty=<pages>
79 Number of dirty pages.
80
81 mapped=<pages>
82 Total number of mapped pages, if different from dirty and anon
83 pages.
84
85 mapmax=<count>
86 Maximum mapcount (number of processes mapping a single page) en‐
87 countered during the scan. This may be used as an indicator of
88 the degree of sharing occurring in a given memory range.
89
90 swapcache=<count>
91 Number of pages that have an associated entry on a swap device.
92
93 active=<pages>
94 The number of pages on the active list. This field is shown
95 only if different from the number of pages in this range. This
96 means that some inactive pages exist in the memory range that
97 may be removed from memory by the swapper soon.
98
99 writeback=<pages>
100 Number of pages that are currently being written out to disk.
101
103 No standards govern NUMA interfaces.
104
106 The Linux NUMA system calls and /proc interface are available only if
107 the kernel was configured and built with the CONFIG_NUMA option.
108
109 Library support
110 Link with -lnuma to get the system call definitions. libnuma and the
111 required <numaif.h> header are available in the numactl package.
112
113 However, applications should not use these system calls directly. In‐
114 stead, the higher level interface provided by the numa(3) functions in
115 the numactl package is recommended. The numactl package is available
116 at ⟨ftp://oss.sgi.com/www/projects/libnuma/download/⟩. The package is
117 also included in some Linux distributions. Some distributions include
118 the development library and header in the separate numactl-devel pack‐
119 age.
120
122 get_mempolicy(2), mbind(2), move_pages(2), set_mempolicy(2), numa(3),
123 cpuset(7), numactl(8)
124
126 This page is part of release 5.13 of the Linux man-pages project. A
127 description of the project, information about reporting bugs, and the
128 latest version of this page, can be found at
129 https://www.kernel.org/doc/man-pages/.
130
131
132
133Linux 2021-03-22 NUMA(7)