aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/sysctl/vm.txt
diff options
context:
space:
mode:
authorAndrew Shewmaker <agshew@gmail.com>2013-04-29 18:08:11 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-04-29 18:54:36 -0400
commit4eeab4f5580d11bffedc697684b91b0bca0d5009 (patch)
tree4e9a0c010d34e786df52225039a17aa38e9adf17 /Documentation/sysctl/vm.txt
parentc9b1d0981fcce3d9976d7b7a56e4e0503bc610dd (diff)
mm: replace hardcoded 3% with admin_reserve_pages knob
Add an admin_reserve_kbytes knob to allow admins to change the hardcoded memory reserve to something other than 3%, which may be multiple gigabytes on large memory systems. Only about 8MB is necessary to enable recovery in the default mode, and only a few hundred MB are required even when overcommit is disabled. This affects OVERCOMMIT_GUESS and OVERCOMMIT_NEVER. admin_reserve_kbytes is initialized to min(3% free pages, 8MB) I arrived at 8MB by summing the RSS of sshd or login, bash, and top. Please see first patch in this series for full background, motivation, testing, and full changelog. [akpm@linux-foundation.org: coding-style fixes] [akpm@linux-foundation.org: make init_admin_reserve() static] Signed-off-by: Andrew Shewmaker <agshew@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation/sysctl/vm.txt')
-rw-r--r--Documentation/sysctl/vm.txt30
1 files changed, 30 insertions, 0 deletions
diff --git a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt
index f69895738357..dcc75a9ed919 100644
--- a/Documentation/sysctl/vm.txt
+++ b/Documentation/sysctl/vm.txt
@@ -18,6 +18,7 @@ files can be found in mm/swap.c.
18 18
19Currently, these files are in /proc/sys/vm: 19Currently, these files are in /proc/sys/vm:
20 20
21- admin_reserve_kbytes
21- block_dump 22- block_dump
22- compact_memory 23- compact_memory
23- dirty_background_bytes 24- dirty_background_bytes
@@ -59,6 +60,35 @@ Currently, these files are in /proc/sys/vm:
59 60
60============================================================== 61==============================================================
61 62
63admin_reserve_kbytes
64
65The amount of free memory in the system that should be reserved for users
66with the capability cap_sys_admin.
67
68admin_reserve_kbytes defaults to min(3% of free pages, 8MB)
69
70That should provide enough for the admin to log in and kill a process,
71if necessary, under the default overcommit 'guess' mode.
72
73Systems running under overcommit 'never' should increase this to account
74for the full Virtual Memory Size of programs used to recover. Otherwise,
75root may not be able to log in to recover the system.
76
77How do you calculate a minimum useful reserve?
78
79sshd or login + bash (or some other shell) + top (or ps, kill, etc.)
80
81For overcommit 'guess', we can sum resident set sizes (RSS).
82On x86_64 this is about 8MB.
83
84For overcommit 'never', we can take the max of their virtual sizes (VSZ)
85and add the sum of their RSS.
86On x86_64 this is about 128MB.
87
88Changing this takes effect whenever an application requests memory.
89
90==============================================================
91
62block_dump 92block_dump
63 93
64block_dump enables block I/O debugging when set to a nonzero value. More 94block_dump enables block I/O debugging when set to a nonzero value. More