Comment 5 for bug 1985887

Revision history for this message
Nick Rosbrook (enr0n) wrote :

It seems that systemd-oomd is doing what it is supposed to do -- you're running a memory stress test that is exceeding the memory pressure limits set by systemd-oomd, so it is killing the offending cgroup(s). If you want to run the stress tests in a separate cgroup, try making a script called e.g. `stress.sh`, and execute the script with systemd-run:

$ systemd-run --user ./stress.sh

Further, you can always make changes to Ubuntu's default systemd-oomd configuration[1] if it better suits your stress testing environment.

There are some complaints about the current state of "swap kill" in systemd-oomd, but that has been discussed in [2] and [3].

[1] https://www.freedesktop.org/software/systemd/man/systemd.resource-control.html#ManagedOOMSwap=auto%7Ckill
[2] https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1972159
[3] https://lists.ubuntu.com/archives/ubuntu-devel/2022-June/042116.html