oom: make memory pressure duration configurable through oomd.conf

This commit is contained in:
Anita Zhang
2021-01-24 01:59:03 -08:00
parent 664e54b1bb
commit c20aa7b171
7 changed files with 31 additions and 8 deletions
+3
View File
@@ -14,12 +14,15 @@ if [[ "$cgroup_type" != *"cgroup2"* ]] && [[ "$cgroup_type" != *"0x63677270"* ]]
fi
[[ -e /skipped ]] && exit 0 || true
echo "DefaultMemoryPressureDurationSec=5s" >> /etc/systemd/oomd.conf
systemctl start testsuite-56-testbloat.service
systemctl start testsuite-56-testchill.service
# Verify systemd-oomd is monitoring the expected units
oomctl | grep "/testsuite-56-workload.slice"
oomctl | grep "1%"
oomctl | grep "Default Memory Pressure Duration: 5s"
# systemd-oomd watches for elevated pressure for 30 seconds before acting.
# It can take time to build up pressure so either wait 5 minutes or for the service to fail.