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