4 ms·
I've never had an OOM on Linux requiring a hard reset, but you do need some patience for the kernel's OOM killer to kick in – up to a minute or two, perhaps eve
by arp242 3y ago
I've never had an OOM on Linux requiring a hard reset, but you do need some patience for the kernel's OOM killer to kick in – up to a minute or two, perhaps even a bit bit longer (I never timed it exactly).
- account42 3y agoIf your kernel has magic sysrq enabled you can use Alt + SysRq (aka Print Screen key) + F to manually invoke the OOM killer so you don't need to wait.
- bArray 3y agoI've had it trigger regularly, it fires far too late (if at all) and the system had already become unstable at the point in which it freezes. It should be firing far earlier.
- arp242 3y agoYeah, the system locks up, but it should recover – eventually. You just need to go for a coffee, or bagel, or bowel movement, or wank, or whatever. At least, that's been my experience.
- bArray 3y agoNo, it doesn't always. There has been a few times I've left a machine for literal days (when I really needed it to recover) and it does not recover. My guess is that something causes a kernel panic, like the filesystem getting itself into trouble with the hardware.
- wongarsu 3y agoIf you have too much swap configured it can take hours to recover. Maybe days, never let it go that long without giving up. The kernel is terribly slow at swapping stuff back once memory pressure is gone. Of course the remedy is to have no or very little swap configured, but that's not obvious when compared to other operating systems (for example on Windows more swap never hurts, and the system recovers very quickly once memory pressure is gone)
- bArray 3y agoThat and there are some processes that should never be swapped, and yet they are. I think it should be possible for a process to request that it is never swapped, or to suggest sections of it are never swapped. Even a swap blacklist would be a great start.
- mnw21cam 3y agoI have a work server with 384GB of RAM, some swap on spinning rust, and a fairly old installation of Linux, and it has certainly had times when it has taken hours for the kernel OOM killer to sort the thing out. earlyoom was one of the first things I installed on it. I think the more RAM you have, the worse the OOM behaviour. I also think that recent versions of Linux are much better at this than they used to be.