User Tools

Site Tools


kernel_oom

Understanding OOM Killer

OOM killer is invoked by the kernel when the system runs out of memory

File Description
oom_adj Since Linux Kernel 2.6.36 this file has been deprecated. The new file is oom_score_adj
oom_score_adj This file can be used to adjust the 'badness' which is used to select a process to kill in out-of-memory conditions
0 (never kill) - 1000 (always kill)
If a task is using all its allowed memory, its badness score will be 1000, if its using hald of its allowed memory, its score will be 500
The value of oom_score_adj is added to the badness score to determine which task to kill
Range -1000 to +1000 where '-' is always 0 (never killed)
oom_score This displays the current score that the kernel has given to a process. The process score can increase or decrease depending on the following factors:

- whether the process creates a lot of children using fork(2) (+);
- whether the process has a low nice value (i.e., > 0) (+);
- whether the process has been running a long time, or has used a lot of CPU time (-);
- whether the process is privileged (-);
- whether the process is making direct hardware access (-)


Highest value in the file is killed first.
New process inherits its parents oom value.

kernel_oom.txt · Last modified: 2024/05/23 07:26 by 127.0.0.1

Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki