Operations 4 min read

Why Ubuntu 22.04’s systemd-oomd Randomly Kills Apps and How to Fix It

Ubuntu 22.04 LTS enables systemd‑oomd by default, but many users report that it unexpectedly kills applications like Firefox, Chrome, and VS Code even without visible memory pressure; Canonical explains the termination conditions, highlights the swap‑size issue, and outlines planned fixes for the upcoming 22.04.1 release.

Open Source Linux
Open Source Linux
Open Source Linux
Why Ubuntu 22.04’s systemd-oomd Randomly Kills Apps and How to Fix It

Ubuntu 22.04 LTS introduces a new feature: systemd-oomd is enabled by default as a daemon that terminates some processes when memory pressure is high.

However, the OOMD sometimes kills running programs like Firefox, Chrome, or Visual Studio Code even when the user does not feel any memory pressure, leading to many complaints on the Ubuntu community mailing list.

A frustrated user wrote:

Before killing an application there should be a warning so that users have a chance to save data. After killing, there should at least be an apology and explanation. The current behavior makes Ubuntu 22.04 feel unreliable and unsafe , which is a big problem for an LTS release.

Canonical engineer Nick Rosbrook later explained the conditions under which OOMD terminates processes:

Condition 1: When total system memory usage and swap usage both exceed SwapUsedLimit (90% by default on Ubuntu), any cgroup using more than 5% of swap becomes a candidate for OOM termination.

Condition 2: When a unit’s cgroup memory pressure exceeds MemoryPressureLimit, the monitor will start terminating processes from the cgroup with the highest reclaim rate.

In practice, most terminations are caused by Condition 1, largely because Ubuntu provides only 1 GB of swap, making the 90% threshold easy to reach.

Based on these termination criteria, Nick suggested possible changes such as adjusting how systemd-oomd calculates or triggers memory values, or increasing the SwapUsedLimit, since 1 GB is too small.

The community has opened an Ubuntu development thread to gather broader feedback, and the issue is expected to be addressed in the 22.04.1 update.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

LinuxSwapUbuntuprocess terminationsystemd-oomd
Open Source Linux
Written by

Open Source Linux

Focused on sharing Linux/Unix content, covering fundamentals, system development, network programming, automation/operations, cloud computing, and related professional knowledge.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.