5 ms·
I think this happens when the kernel starts swapping executable images / shared libraries in and out and keeps going for a long time because according to the ke
by rrss 5y ago
I think this happens when the kernel starts swapping executable images / shared libraries in and out and keeps going for a long time because according to the kernel metrics it is making great progress, even though user space is completely stalled because running code is paged out and has to be paged back in to do anything.
earlyoom kills stuff sooner instead of trying this for a long time. I’ve also heard that some people have had some success by locking base system libraries and executables in memory.
(Please let me know if this explanation is not correct or there are other solutions worth trying)
- jleahy 5y agoI normally run Linux without any swap partition and this still happens without swap. Realistically is this kind of oom condition (where oom killer fails to trigger) I just end up pulling the plug. I’ve never been able to track down the exact cause.
- rcxdude 5y agoCode can almost always be paged out, even without a swap file, because it's memory mapped from files on disk. In fact running without swap makes this behaviour worse (i.e. it happens sooner and more suddenly) because then the kernel can't prioritise keeping currently running code in memory over keeping rarely-accessed data in memory. In general you should have some swap and run with earlyoom if you want decent behaviour in a low-memory condition on linux.
- jleahy 5y agoGood point.