From Fedora Project Wiki
(Created page with "{{QA/Test_Case |description=This test case tests that systemd-oomd kills the largest swap consumer when swap used is greater 90% (or whatever limit was defined by systemd-oomd...") |
No edit summary |
||
Line 9: | Line 9: | ||
|actions= | |actions= | ||
# Check that systemd-oomd is running | # Check that systemd-oomd is running: | ||
<pre> | |||
systemctl status systemd-oomd | |||
</pre> | |||
# Check that the systemd-oomd-defaults policy was applied by running `oomctl` and verifying that "/" is listed as a path under "Swap Monitored CGroups" along with the current swap usage. | # Check that the systemd-oomd-defaults policy was applied by running `oomctl` and verifying that "/" is listed as a path under "Swap Monitored CGroups" along with the current swap usage. | ||
# Now run | # Now run the test: | ||
<pre> | |||
systemd-run --user tail /dev/zero | |||
</pre> | |||
|results= | |results= |
Revision as of 11:01, 11 March 2021
Description
This test case tests that systemd-oomd kills the largest swap consumer when swap used is greater 90% (or whatever limit was defined by systemd-oomd-defaults).
Setup
- This test case should be performed on either bare-metal or virtual machines.
- Check that you are running systemd 248~rc1 or higher with
systemctl --version
. - Ensure the systemd-oomd-defaults package is installed (included with Fedora 34).
- Boot the system and log in as a regular user.
How to test
- Check that systemd-oomd is running:
systemctl status systemd-oomd
- Check that the systemd-oomd-defaults policy was applied by running
oomctl
and verifying that "/" is listed as a path under "Swap Monitored CGroups" along with the current swap usage. - Now run the test:
systemd-run --user tail /dev/zero
Expected Results
- systemd-oomd will have killed the unit started above. You can verify by checking for log lines that say something about "swap used <...> is more than 90%" and "systemd-oomd killed <...> process(es)" with
journalctl
. - Swap used should be below 90% (use
free -h
)