Transcript
Meme format: Undertaker standing behind AJ Styles
AJ styles caption: Stubborn process consuming too much memory.
Undertaker caption: OOM Killer
the only times I had OOM killer kick in, the machine was already frozen for a long time trying to swap things in and out and whatnot. So I started using earlyoom - it’ll just nuke that memory hogging process out of existence before it takes the whole machine down.
That sounds to me like it’s basically the same as turning off swap. I don’t think oom killer activates until you fill up your swap as well.
I guess it could still be useful since it’s more tunable than the kernel oom killer.
it’s not, because it takes swap usage into account, so you can benefit from swap without risking a frozen system
I guess swap can still be useful for background browser tabs and apps. I haven’t run swap on my machines for years now, so I can’t really remember how and when it decides to start moving stuff there.
The last few times I ran into OOM killer it’s been from compiling/linking some huge project that used up 90% of my ram on its own… so I’ve probably been having a different experience than most people.
yeah, swap is definitely still useful and it gets used by the kernel well before the main memory is full
Except that most likely, it kills something completely unrelated instead.
It is now my head canon that it randomly chooses a memory location and kills whatever process owns it, repeating as necessary.
The perverse logic of there being a greater chance of hitting a memory hog makes far too much sense.
It can’t actually be this though, can it?
I would rather change the meme to:
“Yeah, with modern RAM settings, you don’t need Swap.”
OOM killer lurking behind.
I’ll need to look into that again. At some point, OOM mostly annoyed me by killing Firefox while I my RAM wasn’t quite full and everything was running smoothly, so I disabled it and never bothered again since then. But occasionally I do run into issues.
Are you sure it was OOM? Just in case, run memtest.
Also make sure to setup enough swap. Swap is literally almost free RAM. Sure it won’t replace it, but on 8gb shitbox, having 32GB on swap really helps. Especially if swapping starts at 70% of ram usage.
And zswap to make less writes to nvme and make it last longer.
It will have been systemd-oomd




