aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/sysctl/vm.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/sysctl/vm.txt')
-rw-r--r--Documentation/sysctl/vm.txt50
1 files changed, 50 insertions, 0 deletions
diff --git a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt
index 078701fdbd4d..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
@@ -53,11 +54,41 @@ Currently, these files are in /proc/sys/vm:
53- percpu_pagelist_fraction 54- percpu_pagelist_fraction
54- stat_interval 55- stat_interval
55- swappiness 56- swappiness
57- user_reserve_kbytes
56- vfs_cache_pressure 58- vfs_cache_pressure
57- zone_reclaim_mode 59- zone_reclaim_mode
58 60
59============================================================== 61==============================================================
60 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
61block_dump 92block_dump
62 93
63block_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
@@ -542,6 +573,7 @@ memory until it actually runs out.
542 573
543When this flag is 2, the kernel uses a "never overcommit" 574When this flag is 2, the kernel uses a "never overcommit"
544policy that attempts to prevent any overcommit of memory. 575policy that attempts to prevent any overcommit of memory.
576Note that user_reserve_kbytes affects this policy.
545 577
546This feature can be very useful because there are a lot of 578This feature can be very useful because there are a lot of
547programs that malloc() huge amounts of memory "just-in-case" 579programs that malloc() huge amounts of memory "just-in-case"
@@ -645,6 +677,24 @@ The default value is 60.
645 677
646============================================================== 678==============================================================
647 679
680- user_reserve_kbytes
681
682When overcommit_memory is set to 2, "never overommit" mode, reserve
683min(3% of current process size, user_reserve_kbytes) of free memory.
684This is intended to prevent a user from starting a single memory hogging
685process, such that they cannot recover (kill the hog).
686
687user_reserve_kbytes defaults to min(3% of the current process size, 128MB).
688
689If this is reduced to zero, then the user will be allowed to allocate
690all free memory with a single process, minus admin_reserve_kbytes.
691Any subsequent attempts to execute a command will result in
692"fork: Cannot allocate memory".
693
694Changing this takes effect whenever an application requests memory.
695
696==============================================================
697
648vfs_cache_pressure 698vfs_cache_pressure
649------------------ 699------------------
650 700