diff options
Diffstat (limited to 'Documentation/filesystems/proc.txt')
-rw-r--r-- | Documentation/filesystems/proc.txt | 41 |
1 files changed, 32 insertions, 9 deletions
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt index 6c98f2bd421e..d4773565ea2f 100644 --- a/Documentation/filesystems/proc.txt +++ b/Documentation/filesystems/proc.txt | |||
@@ -133,6 +133,7 @@ Table 1-1: Process specific entries in /proc | |||
133 | statm Process memory status information | 133 | statm Process memory status information |
134 | status Process status in human readable form | 134 | status Process status in human readable form |
135 | wchan If CONFIG_KALLSYMS is set, a pre-decoded wchan | 135 | wchan If CONFIG_KALLSYMS is set, a pre-decoded wchan |
136 | smaps Extension based on maps, presenting the rss size for each mapped file | ||
136 | .............................................................................. | 137 | .............................................................................. |
137 | 138 | ||
138 | For example, to get the status information of a process, all you have to do is | 139 | For example, to get the status information of a process, all you have to do is |
@@ -1240,16 +1241,38 @@ swap-intensive. | |||
1240 | overcommit_memory | 1241 | overcommit_memory |
1241 | ----------------- | 1242 | ----------------- |
1242 | 1243 | ||
1243 | This file contains one value. The following algorithm is used to decide if | 1244 | Controls overcommit of system memory, possibly allowing processes |
1244 | there's enough memory: if the value of overcommit_memory is positive, then | 1245 | to allocate (but not use) more memory than is actually available. |
1245 | there's always enough memory. This is a useful feature, since programs often | ||
1246 | malloc() huge amounts of memory 'just in case', while they only use a small | ||
1247 | part of it. Leaving this value at 0 will lead to the failure of such a huge | ||
1248 | malloc(), when in fact the system has enough memory for the program to run. | ||
1249 | 1246 | ||
1250 | On the other hand, enabling this feature can cause you to run out of memory | 1247 | |
1251 | and thrash the system to death, so large and/or important servers will want to | 1248 | 0 - Heuristic overcommit handling. Obvious overcommits of |
1252 | set this value to 0. | 1249 | address space are refused. Used for a typical system. It |
1250 | ensures a seriously wild allocation fails while allowing | ||
1251 | overcommit to reduce swap usage. root is allowed to | ||
1252 | allocate slighly more memory in this mode. This is the | ||
1253 | default. | ||
1254 | |||
1255 | 1 - Always overcommit. Appropriate for some scientific | ||
1256 | applications. | ||
1257 | |||
1258 | 2 - Don't overcommit. The total address space commit | ||
1259 | for the system is not permitted to exceed swap plus a | ||
1260 | configurable percentage (default is 50) of physical RAM. | ||
1261 | Depending on the percentage you use, in most situations | ||
1262 | this means a process will not be killed while attempting | ||
1263 | to use already-allocated memory but will receive errors | ||
1264 | on memory allocation as appropriate. | ||
1265 | |||
1266 | overcommit_ratio | ||
1267 | ---------------- | ||
1268 | |||
1269 | Percentage of physical memory size to include in overcommit calculations | ||
1270 | (see above.) | ||
1271 | |||
1272 | Memory allocation limit = swapspace + physmem * (overcommit_ratio / 100) | ||
1273 | |||
1274 | swapspace = total size of all swap areas | ||
1275 | physmem = size of physical memory in system | ||
1253 | 1276 | ||
1254 | nr_hugepages and hugetlb_shm_group | 1277 | nr_hugepages and hugetlb_shm_group |
1255 | ---------------------------------- | 1278 | ---------------------------------- |