lkml.org 
[lkml]   [2006]   [Aug]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] oom_adj/oom_score documentation
I was looking for the a way around an OOM-problem, and found
a couple of undocumented new features for tuning the OOM-score
of individual processes. Here's a small documentation patch for
/proc/<pid>/oom_adj and /proc/<pid>/oom_score.

Signed-off-by: Jan-Frode Myklebust <mykleb@no.ibm.com>

---

diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt
index 99902ae..81bb8ea 100644
--- a/Documentation/filesystems/proc.txt
+++ b/Documentation/filesystems/proc.txt
@@ -39,6 +39,8 @@ Table of Contents
2.9 Appletalk
2.10 IPX
2.11 /proc/sys/fs/mqueue - POSIX message queues filesystem
+ 2.12 /proc/<pid>/oom_adj - Adjust the oom-killer score
+ 2.13 /proc/<pid>/oom_score - Display current oom-killer score

------------------------------------------------------------------------------
Preface
@@ -1958,6 +1960,21 @@ a queue must be less or equal then msg_m
maximum message size value (it is every message queue's attribute set during
its creation).

+2.12 /proc/<pid>/oom_adj - Adjust the oom-killer score
+------------------------------------------------------
+
+This file can be used to adjust the score used to select which processes shall
+be killed in an out-of-memory situation. Giving it a high score, increase the
+likelihood of this process being killed by the oom-killer. Valid values are in
+the range [-16:15], plus the special value '-17', which defeat the oom-killer
+altogether.
+
+2.13 /proc/<pid>/oom_score - Display current oom-killer score
+-------------------------------------------------------------
+
+This file can be used to check what the current score used by the oom-killer
+is for any given <pid>. Use it together with /proc/<pid>/oom_adj to tune which
+process will be killed in an out-of-memory situation.

------------------------------------------------------------------------------
Summary
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2006-08-01 16:17    [W:0.038 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site