proc.5: Document /proc/sys/vm/user_reserve_kbytes

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2017-01-16 15:44:09 +13:00
parent 4fb6ed947d
commit 01b63c3412
1 changed files with 25 additions and 0 deletions

View File

@ -5209,6 +5209,31 @@ Higher values increase aggressiveness, lower values
decrease aggressiveness.
The default value is 60.
.TP
.IR /proc/sys/vm/user_reserve_kbytes " (since Linux 3.10)"
.\" commit c9b1d0981fcce3d9976d7b7a56e4e0503bc610dd
Specifies an amount of memory (in KiB) to reserve for user processes,
This is intended to prevent a user from starting a single memory hogging
process, such that they cannot recover (kill the hog).
The value in this file has an effect only when
.IR /proc/sys/vm/overcommit_memory
is set to 2 ("overcommit never" mode).
In this case, the system reserves an amount of memory that is the minimum
of [3% of current process size,
.IR user_reserve_kbytes ].
The default value in this file is the minimum of [3% of free pages, 128MiB]
expressed as KiB.
If the value in this file is set to zero,
then a user will be allowed to allocate all free memory with a single process
(minus the amount reserved by
.IR /proc/sys/vm/admin_reserve_kbytes ).
Any subsequent attempts to execute a command will result in
"fork: Cannot allocate memory".
Changing the value in this file takes effect whenever
an application requests memory.
.TP
.IR /proc/sysrq-trigger " (since Linux 2.4.21)"
Writing a character to this file triggers the same SysRq function as
typing ALT-SysRq-<character> (see the description of