Systemd-OOMD Continues Coming Together For Better Linux Out-Of-Memory Handling

Written by Michael Larabel in systemd on 10 April 2020 at 08:49 AM EDT. 85 Comments
SYSTEMD
Beyond the new systemd-homed functionality, another improvement to look forward to in the systemd space this calendar year is systemd-oomd materializing as its new out-of-memory daemon.

As reported on last summer, systemd is looking to improve Linux's out-of-memory handling. To do this, systemd is working to leverage Facebook's out-of-memory daemon that was originally designed for memory pressure / out-of-memory use-cases on their servers but since then is being adapted for desktop use-cases as well.

The systemd + OOMD work has been ongoing for several months. It's looking though like the work is getting closer to mainline -- Facebook engineer Anita Zhang opened the merge request at the end of March for introducing systemd-oomd as this out-of-memory component.

The draft pull request is only tentative as while the code is functionality, there still are some items being completed and this PR is for facilitating the review process.

The systemd-oomd manager/daemon polls systemd for OOMD-enabled cgroups to monitor them and kill based on memory pressure or swap usage. A new oomd.conf configuration file allows for configuring the systemd-oomd behavior based on swap or memory pressure metrics. Cgroups need to have EnableOomdKill enabled if they want to be killed when under pressure.

Hopefully this systemd-oomd support will get squared away in time for making it into the autumn 2020 Linux distribution releases for improving the less than ideal Linux out-of-memory experience.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week