- cross-posted to:
- programmer_humor@programming.dev
- cross-posted to:
- programmer_humor@programming.dev
Transcript
Meme format: Undertaker standing behind AJ Styles
AJ styles caption: Stubborn process consuming too much memory.
Undertaker caption: OOM Killer
Random but in Afrikaans, oom means uncle. Thought that was mildly humorous.
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.
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.
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.
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 believe, and I could be very wrong, that it kills the largest memory process. The problem is that it may not be the problematic process. You could have a well behaved DB that is using a stable 80%, and a runaway process that rapidly fills the remaining 20%, and OOM will kill the DB, and let the out of control process keep consuming memory until it becomes the largest. Then your DB is down and you don’t known why.
I like the idea of just killing processes at random though. Determinism is overrated.
I would rather change the meme to:
“Yeah, with modern RAM settings, you don’t need Swap.”
OOM killer lurking behind.





