proc-pid-oom_adj 1.1 KB

1234567891011121314151617181920212223
  1. What: /proc/<pid>/oom_adj
  2. When: August 2012
  3. Why: /proc/<pid>/oom_adj allows userspace to influence the oom killer's
  4. badness heuristic used to determine which task to kill when the kernel
  5. is out of memory.
  6. The badness heuristic has since been rewritten since the introduction of
  7. this tunable such that its meaning is deprecated. The value was
  8. implemented as a bitshift on a score generated by the badness()
  9. function that did not have any precise units of measure. With the
  10. rewrite, the score is given as a proportion of available memory to the
  11. task allocating pages, so using a bitshift which grows the score
  12. exponentially is, thus, impossible to tune with fine granularity.
  13. A much more powerful interface, /proc/<pid>/oom_score_adj, was
  14. introduced with the oom killer rewrite that allows users to increase or
  15. decrease the badness score linearly. This interface will replace
  16. /proc/<pid>/oom_adj.
  17. A warning will be emitted to the kernel log if an application uses this
  18. deprecated interface. After it is printed once, future warnings will be
  19. suppressed until the kernel is rebooted.