1CHOOM(1)                         User Commands                        CHOOM(1)
2
3
4

NAME

6       choom - display and adjust OOM-killer score.
7

SYNOPSIS

9       choom -p pid
10
11       choom -p pid -n number
12
13       choom -n number command [argument...]
14
15

DESCRIPTION

17       The  choom command displays and adjusts Out-Of-Memory killer score set‐
18       ting.
19
20

OPTIONS

22       -p, --pid pid
23              Specifies process ID.
24
25       -n, --adjust value
26              Specify the adjust score value.
27
28       -h, --help
29              Display help text and exit.
30
31       -V, --version
32              Display version information and exit.
33

NOTES

35       Linux kernel uses the badness heuristic to select  which  process  gets
36       killed in out of memory conditions.
37
38       The  badness  heuristic  assigns a value to each candidate task ranging
39       from 0 (never kill) to 1000 (always kill) to determine which process is
40       targeted.   The  units  are  roughly  a  proportion along that range of
41       allowed memory the process may allocate from based on an estimation  of
42       its  current  memory and swap use.  For example, if a task is using all
43       allowed memory, its badness score will be 1000.  If it is using half of
44       its allowed memory, its score will be 500.
45
46       There  is  an additional factor included in the badness score: the cur‐
47       rent memory and swap usage is discounted by 3% for root processes.
48
49       The amount of "allowed" memory depends on the context in which the  oom
50       killer was called.  If it is due to the memory assigned to the allocat‐
51       ing task's cpuset being exhausted, the allowed  memory  represents  the
52       set  of  mems  assigned  to that cpuset.  If it is due to a mempolicy's
53       node(s) being exhausted, the allowed memory represents the set of  mem‐
54       policy  nodes.   If  it  is due to a memory limit (or swap limit) being
55       reached, the allowed memory is that configured limit.  Finally,  if  it
56       is  due  to  the  entire system being out of memory, the allowed memory
57       represents all allocatable resources.
58
59       The adjust score value is added to the badness score before it is  used
60       to determine which task to kill.  Acceptable values range from -1000 to
61       +1000.  This allows  userspace  to  polarize  the  preference  for  oom
62       killing  either  by always preferring a certain task or completely dis‐
63       abling it.  The lowest possible value, -1000,  is  equivalent  to  dis‐
64       abling oom killing entirely for that task since it will always report a
65       badness score of 0.
66
67       Setting an adjust score value of +500, for example, is roughly  equiva‐
68       lent  to  allowing  the  remainder  of  tasks  sharing the same system,
69       cpuset, mempolicy, or memory controller resources to use at  least  50%
70       more  memory.   A  value  of  -500, on the other hand, would be roughly
71       equivalent to discounting 50% of the task's allowed memory  from  being
72       considered as scoring against the task.
73
74

AUTHORS

76       Karel Zak <kzak@redhat.com>
77

SEE ALSO

79       proc(5)
80

AVAILABILITY

82       The  choom  command  is part of the util-linux package and is available
83       from Linux Kernel Archive ⟨https://www.kernel.org/pub/linux/utils/util-
84       linux/⟩.
85
86
87
88util-linux                        April 2018                          CHOOM(1)
Impressum