Fedora 36 silently kills apps in the background

Hi,
like in the title. When I have unity and rider opened in the background and will go to another workspace for like 5 minutes, when I come back both apps are not there anymore and I need to open it again. Which is strange. Also when I was checking journalctl I didn’t see any error that could be the reason. Also it only happens for apps that are heavy on resources.
Anyone has an idea what’s happening?

Edit:
ram usage is 13,6 / 16 GB
It could be the reason, but it only happens on fedora. On every other distro I tried I never encountered this issue.

1 Like

My first guess would be the OOM (out of memory) killer that replaced earlyoom in Fedora 34:

https://fedoraproject.org/wiki/Changes/EnableSystemdOomd

3 Likes

Create an additional 8 Gb swap file and see if the issue persists.

Also, you should be able to find oom messages in the journal.

This is for sure a systemd-oomd action. A process should not claim for long time a huge amount of memory. See man systemd-oomd and oomd.conf. Simplest check is “systemctl stop systemd-oomd” and “systemctl disable systemd-oomd”. (where of course the protection against out-of-memory situations is lost) A second thing to look at in Fedora is zram swap. Part of the memory is used as compressed swap space, reducing the amount of swap to disk. This might or might not be good in case of programs using a lot of (resident?) memory. Looking to the amount of used swap and adding a swap file (partition not needed) when necessary is also a good advice, see above.

1 Like

journalctl -f -u systemd-oomd

1 Like
May 30 17:12:27 ADRIAN-OMEN systemd[1]: Starting systemd-oomd.service - Userspace Out-Of-Memory (OOM) Killer...
May 30 17:12:27 ADRIAN-OMEN systemd[1]: Started systemd-oomd.service - Userspace Out-Of-Memory (OOM) Killer.
May 31 19:19:02 ADRIAN-OMEN systemd-oomd[836]: Killed /user.slice/user-1000.slice/user@1000.service/app.slice/app-gnome-unityhub-135516.scope due to memory used (15957831680) / total (16162631680) and swap used (7735545856) / total (8589930496) being more than 90.00%
May 31 21:17:39 ADRIAN-OMEN systemd-oomd[836]: Killed /user.slice/user-1000.slice/user@1000.service/app.slice/app-gnome-unityhub-341140.scope due to memory used (15936348160) / total (16162631680) and swap used (7750955008) / total (8589930496) being more than 90.00%

It really is. It’s interesting as other systems, for example ubuntu, that uses early-oom never killed my app. I’ll try creating swap file. Thanks for quick answers.

2 Likes

A post was split to a new topic: Creating a swap file on btrfs