Bug#1118191: systemd-oomd is killing processes when there is plenty of memory
Jonathan Kamens
jik at kamens.us
Thu Oct 16 11:47:24 BST 2025
Package: systemd-oomd
Version: 258-1
Severity: important
I have 32GB of RAM in my desktop and 40GB of swap, of which 25% is
being used as zramswap. I have memory overcommit disabled.
systemd-oomd is regularly killing processes when I am nowhere near
running out of memory.
This appears at first glance to be due to the fact that systemd-oomd
is ignoring the fact that kernel cache memory is available for the
kernel to free up and use for applications at any time, and the kernel
does that automatically when needed.
For example, at 00:41 this morning systemd-oomd decided it had to kill
something. Here's what it logged in journalctl:
Oct 16 00:41:41 jik7 systemd-oomd[3423690]: Considered 78 cgroups for killing, top candidates were:
Oct 16 00:41:41 jik7 systemd-oomd[3423690]: Path: /user.slice/user-1000.slice/user at 1000.service/app.slice/app-gnome-Jik\x20Thunderbird\x20Beta-2976934.scope
Oct 16 00:41:41 jik7 systemd-oomd[3423690]: Memory Pressure Limit: 0.00%
Oct 16 00:41:41 jik7 systemd-oomd[3423690]: Memory Pressure Duration: 0
Oct 16 00:41:41 jik7 systemd-oomd[3423690]: Pressure: Avg10: 0.00, Avg60: 0.00, Avg300: 0.00, Total: 24ms
Oct 16 00:41:41 jik7 systemd-oomd[3423690]: Current Memory Usage: 2.1G
Oct 16 00:41:41 jik7 systemd-oomd[3423690]: Memory Min: 0B
Oct 16 00:41:41 jik7 systemd-oomd[3423690]: Memory Low: 0B
Oct 16 00:41:41 jik7 systemd-oomd[3423690]: Pgscan: 126516
Oct 16 00:41:41 jik7 systemd-oomd[3423690]: Last Pgscan: 126516
Oct 16 00:41:41 jik7 systemd-oomd[3423690]: Killed /user.slice/user-1000.slice/user at 1000.service/app.slice/app-gnome-Jik\x20Thunderbird\x20Beta-2976934.scope due to memory pressure for /user.slice/user-1000.slice/user at 1000.service being 70.38% > 50.00% for > 20s with reclaim activity
When this started happening I started a free process to capture memory
usage every five seconds. Here's what it reported when systemd-oomd
decided it needed to kill a process:
2025-10-16T00:41:04 SwapUse 3047116 CachUse 14649648 MemUse 18893468 MemFree 997668
2025-10-16T00:41:09 SwapUse 3047112 CachUse 14635752 MemUse 18559744 MemFree 973632
2025-10-16T00:41:14 SwapUse 3047100 CachUse 14635824 MemUse 18669484 MemFree 876116
2025-10-16T00:41:19 SwapUse 3047268 CachUse 14636596 MemUse 19060236 MemFree 856040
2025-10-16T00:41:24 SwapUse 3047260 CachUse 14636960 MemUse 19119688 MemFree 796124
2025-10-16T00:41:29 SwapUse 3047456 CachUse 14637000 MemUse 19172424 MemFree 743360
2025-10-16T00:41:34 SwapUse 3047444 CachUse 14637020 MemUse 19000520 MemFree 915252
2025-10-16T00:41:39 SwapUse 3048068 CachUse 14636392 MemUse 19068632 MemFree 847924
2025-10-16T00:41:44 SwapUse 3048092 CachUse 14629204 MemUse 18827080 MemFree 1096580
2025-10-16T00:41:49 SwapUse 2985660 CachUse 14389224 MemUse 17069740 MemFree 2807560
Note that this entire time there was at least 14GB of cache memory
free for the kernel to use as needed. There was no need for
systemd-oomd to kill anything.
Dear Maintainer,
*** Reporter, please consider answering these questions, where appropriate ***
* What led up to the situation?
* What exactly did you do (or not do) that was effective (or
ineffective)?
* What was the outcome of this action?
* What outcome did you expect instead?
*** End of the template - remove these template lines ***
-- System Information:
Debian Release: forky/sid
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 6.16.9+deb14-amd64 (SMP w/20 CPU threads; PREEMPT)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages systemd-oomd depends on:
ii libc6 2.41-12
ii libsystemd-shared 258-1
ii systemd [systemd-sysusers] 258-1
systemd-oomd recommends no packages.
systemd-oomd suggests no packages.
-- no debconf information
More information about the Pkg-systemd-maintainers
mailing list