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