Comment by 3eb7988a1663
8 hours ago
Possibly not a solution for your use case, but I use earlyoom[0]. When memory crosses a threshold value, it will kill the worst offender. Has some knobs to tweak: what threshold level you want, which programs to keep safe, which to prioritize, etc. Never had to touch the configuration, out of the box has been sufficient for me.
I use it when I am doing exploratory work and might materialize something too big. It has always killed the Python process or terminal program which did something silly.
No comments yet
Contribute on Hacker News ↗