Hacker News new | ask | show | jobs
by dice 3403 days ago
>Is there any way to tell the OOM killer which program to kill first?

From TFA:

>Without swap, the system will call the OOM when the memory is exhausted. You can prioritize which processes get killed first in configuring oom_adj_score.

The linked solution document is only available to registered RH users, though, and the name is actually oom_score_adj and not oom_adj_score.

`man 5 proc` has details, but tl;dr is set /proc/<pid>/oom_score_adj to -1000 to make a process OOM-killer-invincible.