blob: 391dd64363e75b560f68bdd69879946b07cf03da [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
Andrew Morton9d0243b2006-01-08 01:00:39 -080029- drop-caches
Christoph Lameter17436602006-01-18 17:42:32 -080030- zone_reclaim_mode
Linus Torvalds1da177e2005-04-16 15:20:36 -070031
32==============================================================
33
34dirty_ratio, dirty_background_ratio, dirty_expire_centisecs,
35dirty_writeback_centisecs, vfs_cache_pressure, laptop_mode,
Andrew Morton9d0243b2006-01-08 01:00:39 -080036block_dump, swap_token_timeout, drop-caches:
Linus Torvalds1da177e2005-04-16 15:20:36 -070037
38See Documentation/filesystems/proc.txt
39
40==============================================================
41
42overcommit_memory:
43
44This value contains a flag that enables memory overcommitment.
45
46When this flag is 0, the kernel attempts to estimate the amount
47of free memory left when userspace requests more memory.
48
49When this flag is 1, the kernel pretends there is always enough
50memory until it actually runs out.
51
52When this flag is 2, the kernel uses a "never overcommit"
53policy that attempts to prevent any overcommit of memory.
54
55This feature can be very useful because there are a lot of
56programs that malloc() huge amounts of memory "just-in-case"
57and don't use much of it.
58
59The default value is 0.
60
61See Documentation/vm/overcommit-accounting and
62security/commoncap.c::cap_vm_enough_memory() for more information.
63
64==============================================================
65
66overcommit_ratio:
67
68When overcommit_memory is set to 2, the committed address
69space is not permitted to exceed swap plus this percentage
70of physical RAM. See above.
71
72==============================================================
73
74page-cluster:
75
76The Linux VM subsystem avoids excessive disk seeks by reading
77multiple pages on a page fault. The number of pages it reads
78is dependent on the amount of memory in your machine.
79
80The number of pages the kernel reads in at once is equal to
812 ^ page-cluster. Values above 2 ^ 5 don't make much sense
82for swap because we only cluster swap data in 32-page groups.
83
84==============================================================
85
86max_map_count:
87
88This file contains the maximum number of memory map areas a process
89may have. Memory map areas are used as a side-effect of calling
90malloc, directly by mmap and mprotect, and also when loading shared
91libraries.
92
93While most applications need less than a thousand maps, certain
94programs, particularly malloc debuggers, may consume lots of them,
95e.g., up to one or two maps per allocation.
96
97The default value is 65536.
98
99==============================================================
100
101min_free_kbytes:
102
103This is used to force the Linux VM to keep a minimum number
104of kilobytes free. The VM uses this number to compute a pages_min
105value for each lowmem zone in the system. Each lowmem zone gets
106a number of reserved free pages based proportionally on its size.
Rohit Seth8ad4b1f2006-01-08 01:00:40 -0800107
108==============================================================
109
110percpu_pagelist_fraction
111
112This is the fraction of pages at most (high mark pcp->high) in each zone that
113are allocated for each per cpu page list. The min value for this is 8. It
114means that we don't allow more than 1/8th of pages in each zone to be
115allocated in any single per_cpu_pagelist. This entry only changes the value
116of hot per cpu pagelists. User can specify a number like 100 to allocate
1171/100th of each zone to each per cpu page list.
118
119The batch value of each per cpu pagelist is also updated as a result. It is
120set to pcp->high/4. The upper limit of batch is (PAGE_SHIFT * 8)
121
122The initial value is zero. Kernel does not use this value at boot time to set
123the high water marks for each per cpu page list.
Christoph Lameter17436602006-01-18 17:42:32 -0800124
125===============================================================
126
127zone_reclaim_mode:
128
129This is set during bootup to 1 if it is determined that pages from
130remote zones will cause a significant performance reduction. The
131page allocator will then reclaim easily reusable pages (those page
132cache pages that are currently not used) before going off node.
133
134The user can override this setting. It may be beneficial to switch
135off zone reclaim if the system is used for a file server and all
136of memory should be used for caching files from disk.
137
138It may be beneficial to switch this on if one wants to do zone
139reclaim regardless of the numa distances in the system.
140