Description of problem: The new one 'systemd-oomd' is replaced old one 'earlyoom' in f34. The CPU utilization is to high compared with earlyoom. systemd-oomd consumes 0.7-1.3% on Ryzen CPU (Zen 2). earlyoom usage was nearly zero. This could negatively impact on laptop power usage and reduce battery life and power efficiency. Tested on Fedora 34 Workstation (GNOME). KDE users reporting the same results. Version-Release number of selected component (if applicable): systemd-248~rc4-3.fc34 How reproducible: $ sudo dnf install htop Look at current 'systemd-oomd` process CPU usage and TIME+ column. Actual results: * Current CPU usage: 0.7-1.3%. * TIME+: in top after the 'gnome-shell' process. Expected results: 'systemd-oomd' CPU utilization is equal to 'earlyoom' or even less.
https://github.com/systemd/systemd/pull/19126
Can the patches in https://github.com/systemd/systemd/pull/19126 be considered for picking to Fedora 34 branch? On older systems systemd-oomd is non-stop 6-10% CPU usage. After a few hours of uptime, it consistently has more TIME+ then gnome-shell.
FEDORA-2021-775e2373a1 has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-775e2373a1
On my laptop with Fedora 34 and MATE Desktop, systemd-oomd has the second highest total CPU in top. The only process with more CPU is Xorg, and systemd-oomd has about half of the total CPU as Xorg. I have kernel 5.12.9-300.fc34.x86_64 and systemd-248.3-1.fc34.x86_64 The update from last month does not seem to have fixed the problem.
If I rarely run more than a few applications on my laptop, is there any danger with running `systemctl mask --now systemd-oomd.service`?
(In reply to William Bader from comment #5) > If I rarely run more than a few applications on my laptop, is there any > danger with running `systemctl mask --now systemd-oomd.service`? You don't need to mask it. 'systemctl disable --now systemd-oomd.service' is fine. You can do 'systemctl enable --now earlyoom.service' afterwards to restore the mechanism that was used before systemd-oomd. Using neither is also fine.
(In reply to Zbigniew Jędrzejewski-Szmek from comment #6) > You don't need to mask it. When I disabled systemd-oomd without masking it, it seemed to get restarted, I think by other units. I notice when systemd-oomd is running because it burns enough CPU to keep my laptop's fan constantly running. > Using neither is also fine. Thanks. I have been running without either oom for over two weeks with no problems.
systemd-249-1.fc35 might improve the situation. I'll backport the patches to f34 later on.
systemd-248.4-1.fc34 included the patch to improve oomd resource usage: * 50fe0594d2 oomd: don't collect candidate stats on every interval I hope this is fixed now. If now, please open a new bug.
(In reply to Zbigniew Jędrzejewski-Szmek from comment #9) Thanks for info. Can't test in f34 now, but it's definitely fixed on f35 and new Systemd. 43 seconds CPU time used per 24 hours. Great!