13 ms·
As soon as I figure out how to get the OOM killer to just kill Chrome every time, I might never have to hard reset my system again!
by lostdog 6y ago
As soon as I figure out how to get the OOM killer to just kill Chrome every time, I might never have to hard reset my system again!
- jwilk 6y agoCuriously, in https://bugs.chromium.org/p/chromium/issues/detail?id=333617 https://bugs.chromium.org/p/chromium/issues/detail?id=333617 people are complaining about the opposite problem: Linux kills a Chromium process, leaving bigger memory hogs roaming around.
- cbsks 6y agoYou are looking for /proc/<pid>/oom_score_adj: https://github.com/torvalds/linux/blob/15a2bc4dbb9cfed1c661a657fcb10798150b7598/Documentation/filesystems/proc.rst#31-procpidoom_adj--procpidoom_score_adj--adjust-the-oom-killer-score https://github.com/torvalds/linux/blob/15a2bc4dbb9cfed1c661a...
- z991 6y agoOn Ubuntu, earlyoom basically does that. It's great. sudo apt install earlyoom
- lostdog 6y agoLooks brilliant, thank you!
- hinoki 6y agoI’ve case you are serious, replace chrome with: #!/bin/bash echo 1000 > /proc/$$/oom_score_adj path_to_real_chrome
- mappu 6y agoWhat's the maintainable way of doing this, that can survive chrome package updates and also handle http URIs opened from other applications?
- steerablesafe 6y agoHow do you typically start chrome? I guess you could just change the .desktop file somewhere in $HOME, system updates don't touch that.
- zbentley 6y agoWon't that just OOM-shield the shell launching chrome and not the chrome process itself? I think you want "exec path_to_real_chrome".