Commit | Line | Data |
---|---|---|
1da177e4 LT |
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 | - laptop_mode | |
28 | - block_dump | |
29 | ||
30 | ============================================================== | |
31 | ||
32 | dirty_ratio, dirty_background_ratio, dirty_expire_centisecs, | |
33 | dirty_writeback_centisecs, vfs_cache_pressure, laptop_mode, | |
34 | block_dump, swap_token_timeout: | |
35 | ||
36 | See Documentation/filesystems/proc.txt | |
37 | ||
38 | ============================================================== | |
39 | ||
40 | overcommit_memory: | |
41 | ||
42 | This value contains a flag that enables memory overcommitment. | |
43 | ||
44 | When this flag is 0, the kernel attempts to estimate the amount | |
45 | of free memory left when userspace requests more memory. | |
46 | ||
47 | When this flag is 1, the kernel pretends there is always enough | |
48 | memory until it actually runs out. | |
49 | ||
50 | When this flag is 2, the kernel uses a "never overcommit" | |
51 | policy that attempts to prevent any overcommit of memory. | |
52 | ||
53 | This feature can be very useful because there are a lot of | |
54 | programs that malloc() huge amounts of memory "just-in-case" | |
55 | and don't use much of it. | |
56 | ||
57 | The default value is 0. | |
58 | ||
59 | See Documentation/vm/overcommit-accounting and | |
60 | security/commoncap.c::cap_vm_enough_memory() for more information. | |
61 | ||
62 | ============================================================== | |
63 | ||
64 | overcommit_ratio: | |
65 | ||
66 | When overcommit_memory is set to 2, the committed address | |
67 | space is not permitted to exceed swap plus this percentage | |
68 | of physical RAM. See above. | |
69 | ||
70 | ============================================================== | |
71 | ||
72 | page-cluster: | |
73 | ||
74 | The Linux VM subsystem avoids excessive disk seeks by reading | |
75 | multiple pages on a page fault. The number of pages it reads | |
76 | is dependent on the amount of memory in your machine. | |
77 | ||
78 | The number of pages the kernel reads in at once is equal to | |
79 | 2 ^ page-cluster. Values above 2 ^ 5 don't make much sense | |
80 | for swap because we only cluster swap data in 32-page groups. | |
81 | ||
82 | ============================================================== | |
83 | ||
84 | max_map_count: | |
85 | ||
86 | This file contains the maximum number of memory map areas a process | |
87 | may have. Memory map areas are used as a side-effect of calling | |
88 | malloc, directly by mmap and mprotect, and also when loading shared | |
89 | libraries. | |
90 | ||
91 | While most applications need less than a thousand maps, certain | |
92 | programs, particularly malloc debuggers, may consume lots of them, | |
93 | e.g., up to one or two maps per allocation. | |
94 | ||
95 | The default value is 65536. | |
96 | ||
97 | ============================================================== | |
98 | ||
99 | min_free_kbytes: | |
100 | ||
101 | This is used to force the Linux VM to keep a minimum number | |
102 | of kilobytes free. The VM uses this number to compute a pages_min | |
103 | value for each lowmem zone in the system. Each lowmem zone gets | |
104 | a number of reserved free pages based proportionally on its size. |