aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/filesystems/proc.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/filesystems/proc.txt')
-rw-r--r--Documentation/filesystems/proc.txt41
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
138For example, to get the status information of a process, all you have to do is 139For example, to get the status information of a process, all you have to do is
@@ -1240,16 +1241,38 @@ swap-intensive.
1240overcommit_memory 1241overcommit_memory
1241----------------- 1242-----------------
1242 1243
1243This file contains one value. The following algorithm is used to decide if 1244Controls overcommit of system memory, possibly allowing processes
1244there's enough memory: if the value of overcommit_memory is positive, then 1245to allocate (but not use) more memory than is actually available.
1245there's always enough memory. This is a useful feature, since programs often
1246malloc() huge amounts of memory 'just in case', while they only use a small
1247part of it. Leaving this value at 0 will lead to the failure of such a huge
1248malloc(), when in fact the system has enough memory for the program to run.
1249 1246
1250On the other hand, enabling this feature can cause you to run out of memory 1247
1251and thrash the system to death, so large and/or important servers will want to 12480 - Heuristic overcommit handling. Obvious overcommits of
1252set 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
12551 - Always overcommit. Appropriate for some scientific
1256 applications.
1257
12582 - 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
1266overcommit_ratio
1267----------------
1268
1269Percentage of physical memory size to include in overcommit calculations
1270(see above.)
1271
1272Memory 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
1254nr_hugepages and hugetlb_shm_group 1277nr_hugepages and hugetlb_shm_group
1255---------------------------------- 1278----------------------------------