What is the recommended way to handle OOM on Tumbleweed? I recently noticed that my installation of TW doesn’t have any OOM manager beside what the kernel provides. So I tried this simple test tail /dev/zero and watched the memory in the system monitor. When both the memory and swap filled up, the system froze. I decided to wait a bit longer and after a minute or so the kernel finally killed that rogue tail process. This made me wonder why isn’t there any OOM manager installed?
I searched for a way to install systemd-oomd, which appears to be a part of the systemd-experimental package. Upon the installation I enabled the service and rebooted just in case. I reran the tail test, but it seemed like systemd-oomd didn’t work because the system froze again. I checked the journalctl log which indicated that it was the kernel oom killer that resolved the oom, not the systemd-oomd.
So I uninstalled systemd-oomd and installed earlyoom instead. This time it worked perfectly and killed the test tail process just when it was about to consume all the swap. But the system remained responsive at all times.
I couldn’t find any recommendations for the OOM manager for openSUSE. This looks like an oversight.
Just a note, make any sysctl changes as conf files down in /etc/sysctl.d/ directory, openSUSE Tumbleweed also moved to /usr/etc so some configs that use to reside in /etc have moved, but can be overridden in /etc/some.d/ directory.