Debian Codegraph @

upstream/debian-trixie/man5/proc_meminfo.5

raw
1 .\" Copyright (C) 1994, 1995, Daniel Quinlan <[email protected]>
2 .\" Copyright (C) 2002-2008, 2017, Michael Kerrisk <[email protected]>
3 .\" Copyright (C) 2023, Alejandro Colomar <[email protected]>
4 .\"
5 .\" SPDX-License-Identifier: GPL-3.0-or-later
6 .\"
7 .TH proc_meminfo 5 2024-05-02 "Linux man-pages 6.9.1"
8 .SH NAME
9 /proc/meminfo \- memory usage
10 .SH DESCRIPTION
11 .TP
12 .I /proc/meminfo
13 This file reports statistics about memory usage on the system.
14 It is used by
15 .BR free (1)
16 to report the amount of free and used memory (both physical and swap)
17 on the system as well as the shared memory and buffers used by the
18 kernel.
19 Each line of the file consists of a parameter name, followed by a colon,
20 the value of the parameter, and an option unit of measurement (e.g., "kB").
21 The list below describes the parameter names and
22 the format specifier required to read the field value.
23 Except as noted below,
24 all of the fields have been present since at least Linux 2.6.0.
25 Some fields are displayed only if the kernel was configured
26 with various options; those dependencies are noted in the list.
27 .RS
28 .TP
29 .IR MemTotal " %lu"
30 Total usable RAM (i.e., physical RAM minus a few reserved
31 bits and the kernel binary code).
32 .TP
33 .IR MemFree " %lu"
34 The sum of
35 .IR LowFree + HighFree .
36 .TP
37 .IR MemAvailable " %lu (since Linux 3.14)"
38 An estimate of how much memory is available for starting new
39 applications, without swapping.
40 .TP
41 .IR Buffers " %lu"
42 Relatively temporary storage for raw disk blocks that
43 shouldn't get tremendously large (20 MB or so).
44 .TP
45 .IR Cached " %lu"
46 In-memory cache for files read from the disk (the page cache).
47 Doesn't include
48 .IR SwapCached .
49 .TP
50 .IR SwapCached " %lu"
51 Memory that once was swapped out, is swapped back in but
52 still also is in the swap file.
53 (If memory pressure is high, these pages
54 don't need to be swapped out again because they are already
55 in the swap file.
56 This saves I/O.)
57 .TP
58 .IR Active " %lu"
59 Memory that has been used more recently and usually not
60 reclaimed unless absolutely necessary.
61 .TP
62 .IR Inactive " %lu"
63 Memory which has been less recently used.
64 It is more eligible to be reclaimed for other purposes.
65 .TP
66 .IR Active(anon) " %lu (since Linux 2.6.28)"
67 [To be documented.]
68 .TP
69 .IR Inactive(anon) " %lu (since Linux 2.6.28)"
70 [To be documented.]
71 .TP
72 .IR Active(file) " %lu (since Linux 2.6.28)"
73 [To be documented.]
74 .TP
75 .IR Inactive(file) " %lu (since Linux 2.6.28)"
76 [To be documented.]
77 .TP
78 .IR Unevictable " %lu (since Linux 2.6.28)"
79 (From Linux 2.6.28 to Linux 2.6.30,
80 \fBCONFIG_UNEVICTABLE_LRU\fP was required.)
81 [To be documented.]
82 .TP
83 .IR Mlocked " %lu (since Linux 2.6.28)"
84 (From Linux 2.6.28 to Linux 2.6.30,
85 \fBCONFIG_UNEVICTABLE_LRU\fP was required.)
86 [To be documented.]
87 .TP
88 .IR HighTotal " %lu"
89 (Starting with Linux 2.6.19, \fBCONFIG_HIGHMEM\fP is required.)
90 Total amount of highmem.
91 Highmem is all memory above \[ti]860 MB of physical memory.
92 Highmem areas are for use by user-space programs,
93 or for the page cache.
94 The kernel must use tricks to access
95 this memory, making it slower to access than lowmem.
96 .TP
97 .IR HighFree " %lu"
98 (Starting with Linux 2.6.19, \fBCONFIG_HIGHMEM\fP is required.)
99 Amount of free highmem.
100 .TP
101 .IR LowTotal " %lu"
102 (Starting with Linux 2.6.19, \fBCONFIG_HIGHMEM\fP is required.)
103 Total amount of lowmem.
104 Lowmem is memory which can be used for everything that
105 highmem can be used for, but it is also available for the
106 kernel's use for its own data structures.
107 Among many other things,
108 it is where everything from
109 .I Slab
110 is allocated.
111 Bad things happen when you're out of lowmem.
112 .TP
113 .IR LowFree " %lu"
114 (Starting with Linux 2.6.19, \fBCONFIG_HIGHMEM\fP is required.)
115 Amount of free lowmem.
116 .TP
117 .IR MmapCopy " %lu (since Linux 2.6.29)"
118 .RB ( CONFIG_MMU
119 is required.)
120 [To be documented.]
121 .TP
122 .IR SwapTotal " %lu"
123 Total amount of swap space available.
124 .TP
125 .IR SwapFree " %lu"
126 Amount of swap space that is currently unused.
127 .TP
128 .IR Dirty " %lu"
129 Memory which is waiting to get written back to the disk.
130 .TP
131 .IR Writeback " %lu"
132 Memory which is actively being written back to the disk.
133 .TP
134 .IR AnonPages " %lu (since Linux 2.6.18)"
135 Non-file backed pages mapped into user-space page tables.
136 .TP
137 .IR Mapped " %lu"
138 Files which have been mapped into memory (with
139 .BR mmap (2)),
140 such as libraries.
141 .TP
142 .IR Shmem " %lu (since Linux 2.6.32)"
143 Amount of memory consumed in
144 .BR tmpfs (5)
145 filesystems.
146 .TP
147 .IR KReclaimable " %lu (since Linux 4.20)"
148 Kernel allocations that the kernel will attempt to reclaim
149 under memory pressure.
150 Includes
151 .I SReclaimable
152 (below), and other direct allocations with a shrinker.
153 .TP
154 .IR Slab " %lu"
155 In-kernel data structures cache.
156 (See
157 .BR slabinfo (5).)
158 .TP
159 .IR SReclaimable " %lu (since Linux 2.6.19)"
160 Part of
161 .IR Slab ,
162 that might be reclaimed, such as caches.
163 .TP
164 .IR SUnreclaim " %lu (since Linux 2.6.19)"
165 Part of
166 .IR Slab ,
167 that cannot be reclaimed on memory pressure.
168 .TP
169 .IR KernelStack " %lu (since Linux 2.6.32)"
170 Amount of memory allocated to kernel stacks.
171 .TP
172 .IR PageTables " %lu (since Linux 2.6.18)"
173 Amount of memory dedicated to the lowest level of page tables.
174 .TP
175 .IR Quicklists " %lu (since Linux 2.6.27)"
176 (\fBCONFIG_QUICKLIST\fP is required.)
177 [To be documented.]
178 .TP
179 .IR NFS_Unstable " %lu (since Linux 2.6.18)"
180 NFS pages sent to the server, but not yet committed to stable storage.
181 .TP
182 .IR Bounce " %lu (since Linux 2.6.18)"
183 Memory used for block device "bounce buffers".
184 .TP
185 .IR WritebackTmp " %lu (since Linux 2.6.26)"
186 Memory used by FUSE for temporary writeback buffers.
187 .TP
188 .IR CommitLimit " %lu (since Linux 2.6.10)"
189 This is the total amount of memory currently available to
190 be allocated on the system, expressed in kilobytes.
191 This limit is adhered to
192 only if strict overcommit accounting is enabled (mode 2 in
193 .IR /proc/sys/vm/overcommit_memory ).
194 The limit is calculated according to the formula described under
195 .IR /proc/sys/vm/overcommit_memory .
196 For further details, see the kernel source file
197 .IR Documentation/vm/overcommit\-accounting.rst .
198 .TP
199 .IR Committed_AS " %lu"
200 The amount of memory presently allocated on the system.
201 The committed memory is a sum of all of the memory which
202 has been allocated by processes, even if it has not been
203 "used" by them as of yet.
204 A process which allocates 1 GB of memory (using
205 .BR malloc (3)
206 or similar), but touches only 300 MB of that memory will show up
207 as using only 300 MB of memory even if it has the address space
208 allocated for the entire 1 GB.
209 .IP
210 This 1 GB is memory which has been "committed" to by the VM
211 and can be used at any time by the allocating application.
212 With strict overcommit enabled on the system (mode 2 in
213 .IR /proc/sys/vm/overcommit_memory ),
214 allocations which would exceed the
215 .I CommitLimit
216 will not be permitted.
217 This is useful if one needs to guarantee that processes will not
218 fail due to lack of memory once that memory has been successfully allocated.
219 .TP
220 .IR VmallocTotal " %lu"
221 Total size of vmalloc memory area.
222 .TP
223 .IR VmallocUsed " %lu"
224 Amount of vmalloc area which is used.
225 Since Linux 4.4,
226 .\" commit a5ad88ce8c7fae7ddc72ee49a11a75aa837788e0
227 this field is no longer calculated, and is hard coded as 0.
228 See
229 .IR /proc/vmallocinfo .
230 .TP
231 .IR VmallocChunk " %lu"
232 Largest contiguous block of vmalloc area which is free.
233 Since Linux 4.4,
234 .\" commit a5ad88ce8c7fae7ddc72ee49a11a75aa837788e0
235 this field is no longer calculated and is hard coded as 0.
236 See
237 .IR /proc/vmallocinfo .
238 .TP
239 .IR HardwareCorrupted " %lu (since Linux 2.6.32)"
240 (\fBCONFIG_MEMORY_FAILURE\fP is required.)
241 [To be documented.]
242 .TP
243 .IR LazyFree " %lu (since Linux 4.12)"
244 Shows the amount of memory marked by
245 .BR madvise (2)
246 .BR MADV_FREE .
247 .TP
248 .IR AnonHugePages " %lu (since Linux 2.6.38)"
249 (\fBCONFIG_TRANSPARENT_HUGEPAGE\fP is required.)
250 Non-file backed huge pages mapped into user-space page tables.
251 .TP
252 .IR ShmemHugePages " %lu (since Linux 4.8)"
253 (\fBCONFIG_TRANSPARENT_HUGEPAGE\fP is required.)
254 Memory used by shared memory (shmem) and
255 .BR tmpfs (5)
256 allocated with huge pages.
257 .TP
258 .IR ShmemPmdMapped " %lu (since Linux 4.8)"
259 (\fBCONFIG_TRANSPARENT_HUGEPAGE\fP is required.)
260 Shared memory mapped into user space with huge pages.
261 .TP
262 .IR CmaTotal " %lu (since Linux 3.1)"
263 Total CMA (Contiguous Memory Allocator) pages.
264 (\fBCONFIG_CMA\fP is required.)
265 .TP
266 .IR CmaFree " %lu (since Linux 3.1)"
267 Free CMA (Contiguous Memory Allocator) pages.
268 (\fBCONFIG_CMA\fP is required.)
269 .TP
270 .IR HugePages_Total " %lu"
271 (\fBCONFIG_HUGETLB_PAGE\fP is required.)
272 The size of the pool of huge pages.
273 .TP
274 .IR HugePages_Free " %lu"
275 (\fBCONFIG_HUGETLB_PAGE\fP is required.)
276 The number of huge pages in the pool that are not yet allocated.
277 .TP
278 .IR HugePages_Rsvd " %lu (since Linux 2.6.17)"
279 (\fBCONFIG_HUGETLB_PAGE\fP is required.)
280 This is the number of huge pages for
281 which a commitment to allocate from the pool has been made,
282 but no allocation has yet been made.
283 These reserved huge pages
284 guarantee that an application will be able to allocate a
285 huge page from the pool of huge pages at fault time.
286 .TP
287 .IR HugePages_Surp " %lu (since Linux 2.6.24)"
288 (\fBCONFIG_HUGETLB_PAGE\fP is required.)
289 This is the number of huge pages in
290 the pool above the value in
291 .IR /proc/sys/vm/nr_hugepages .
292 The maximum number of surplus huge pages is controlled by
293 .IR /proc/sys/vm/nr_overcommit_hugepages .
294 .TP
295 .IR Hugepagesize " %lu"
296 (\fBCONFIG_HUGETLB_PAGE\fP is required.)
297 The size of huge pages.
298 .TP
299 .IR DirectMap4k " %lu (since Linux 2.6.27)"
300 Number of bytes of RAM linearly mapped by kernel in 4 kB pages.
301 (x86.)
302 .TP
303 .IR DirectMap4M " %lu (since Linux 2.6.27)"
304 Number of bytes of RAM linearly mapped by kernel in 4 MB pages.
305 (x86 with
306 .B CONFIG_X86_64
307 or
308 .B CONFIG_X86_PAE
309 enabled.)
310 .TP
311 .IR DirectMap2M " %lu (since Linux 2.6.27)"
312 Number of bytes of RAM linearly mapped by kernel in 2 MB pages.
313 (x86 with neither
314 .B CONFIG_X86_64
315 nor
316 .B CONFIG_X86_PAE
317 enabled.)
318 .TP
319 .IR DirectMap1G " %lu (since Linux 2.6.27)"
320 (x86 with
321 .B CONFIG_X86_64
322 and
323 .B CONFIG_X86_DIRECT_GBPAGES
324 enabled.)
325 .RE
326 .SH SEE ALSO
327 .BR proc (5)