blob: 2f1aae32a5d9dfc2c0f71bb0400ce4a714d49c07 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001Documentation for /proc/sys/vm/* kernel version 2.2.10
2 (c) 1998, 1999, Rik van Riel <riel@nl.linux.org>
3
4For general info and legal blurb, please look in README.
5
6==============================================================
7
8This file contains the documentation for the sysctl files in
9/proc/sys/vm and is valid for Linux kernel version 2.2.
10
11The files in this directory can be used to tune the operation
12of the virtual memory (VM) subsystem of the Linux kernel and
13the writeout of dirty data to disk.
14
15Default values and initialization routines for most of these
16files can be found in mm/swap.c.
17
18Currently, these files are in /proc/sys/vm:
19- overcommit_memory
20- page-cluster
21- dirty_ratio
22- dirty_background_ratio
23- dirty_expire_centisecs
24- dirty_writeback_centisecs
25- max_map_count
26- min_free_kbytes
27- laptop_mode
28- block_dump
29
30==============================================================
31
32dirty_ratio, dirty_background_ratio, dirty_expire_centisecs,
33dirty_writeback_centisecs, vfs_cache_pressure, laptop_mode,
34block_dump, swap_token_timeout:
35
36See Documentation/filesystems/proc.txt
37
38==============================================================
39
40overcommit_memory:
41
42This value contains a flag that enables memory overcommitment.
43
44When this flag is 0, the kernel attempts to estimate the amount
45of free memory left when userspace requests more memory.
46
47When this flag is 1, the kernel pretends there is always enough
48memory until it actually runs out.
49
50When this flag is 2, the kernel uses a "never overcommit"
51policy that attempts to prevent any overcommit of memory.
52
53This feature can be very useful because there are a lot of
54programs that malloc() huge amounts of memory "just-in-case"
55and don't use much of it.
56
57The default value is 0.
58
59See Documentation/vm/overcommit-accounting and
60security/commoncap.c::cap_vm_enough_memory() for more information.
61
62==============================================================
63
64overcommit_ratio:
65
66When overcommit_memory is set to 2, the committed address
67space is not permitted to exceed swap plus this percentage
68of physical RAM. See above.
69
70==============================================================
71
72page-cluster:
73
74The Linux VM subsystem avoids excessive disk seeks by reading
75multiple pages on a page fault. The number of pages it reads
76is dependent on the amount of memory in your machine.
77
78The number of pages the kernel reads in at once is equal to
792 ^ page-cluster. Values above 2 ^ 5 don't make much sense
80for swap because we only cluster swap data in 32-page groups.
81
82==============================================================
83
84max_map_count:
85
86This file contains the maximum number of memory map areas a process
87may have. Memory map areas are used as a side-effect of calling
88malloc, directly by mmap and mprotect, and also when loading shared
89libraries.
90
91While most applications need less than a thousand maps, certain
92programs, particularly malloc debuggers, may consume lots of them,
93e.g., up to one or two maps per allocation.
94
95The default value is 65536.
96
97==============================================================
98
99min_free_kbytes:
100
101This is used to force the Linux VM to keep a minimum number
102of kilobytes free. The VM uses this number to compute a pages_min
103value for each lowmem zone in the system. Each lowmem zone gets
104a number of reserved free pages based proportionally on its size.