Systemd 247 Merges Systemd-OOMD For Improving Low-Memory/Out-Of-Memory Handling
Systemd-oomd has been developed to improve the Linux out-of-memory / memory pressure behavior and based on Facebook's out-of-memory daemon code that's been extended to not only work for Linux servers but also desktop systems.
The systemd-oomd daemon polls for OOMD-enabled cgroups to monitor and will kill based on memory pressure or swap usage. The systemd-oomd behavior is configurable via a new oomd.conf configuration file. This daemon will only kill groups if EnableOomdKill is set as obviously not wanting to kill random processes over memory use. Other new settings include ManagedOOMSwap=, ManagedOOMMemoryPressure=, and ManagedOOMMemoryPressureLimitPercent= options. The oomctl command is used for analyzing the systemd-oomd state.
For the initial systemd 247 release where it's making the premiere, systemd-oomd will be disabled by default and requires setting -Dmode=developer at build time for activating the developer mode. At least for now it's considered a preview feature and still being refined so at the moment is not recommended for production environments.
The merge amounts to just over three thousand lines of new code.
Systemd developers are working to prepare systemd 247 for release in the coming weeks.