Re: OOM-killer not being involked under memory pressure
> I just checked my other server which has ZFS on root without encryption, and see that I did not enable swap at all on that machine. So I'll disable swap, thrash the RAM with`stress`, and then hopefully the OOM-killer works like it does on that machine.
Yay! Indeed disabling swap allowed the OOM-killer to work.
Pariksheet
$ sudo swapoff -av
swapoff /dev/zd0
$ stress -m 4 --vm-bytes 2000M
stress: info: [16295] dispatching hogs: 0 cpu, 0 io, 4 vm, 0 hdd
stress: FAIL: [16295] (415) <-- worker 16299 got signal 9
stress: WARN: [16295] (417) now reaping child worker processes
stress: FAIL: [16295] (451) failed run completed in 2s
$ sudo journalctl -rt kernel | head
-- Logs begin at Tue 2020-06-23 13:23:36 EDT, end at Thu 2020-09-24 20:06:09 EDT. --
Sep 24 20:02:12 xm1 kernel: oom_reaper: reaped process 16838 (stress), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
Sep 24 20:02:12 xm1 kernel: Killed process 16838 (stress) total-vm:2051852kB, anon-rss:1345260kB, file-rss:0kB, shmem-rss:0kB
Sep 24 20:02:12 xm1 kernel: Out of memory: Kill process 16838 (stress) score 166 or sacrifice child
Sep 24 20:02:12 xm1 kernel: [ 16840] 0 16840 1143 39 53248 0 0 nc
Sep 24 20:02:12 xm1 kernel: [ 16839] 1000 16839 512963 323517 2637824 0 0 stress
Sep 24 20:02:12 xm1 kernel: [ 16838] 1000 16838 512963 336315 2740224 0 0 stress
Sep 24 20:02:12 xm1 kernel: [ 16837] 1000 16837 512963 308763 2523136 0 0 stress
Sep 24 20:02:12 xm1 kernel: [ 16836] 1000 16836 512963 313283 2555904 0 0 stress
Sep 24 20:02:12 xm1 kernel: [ 16835] 1000 16835 962 20 40960 0 0 stress
Reply to: