]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: fix TEST-56-OOMD thresholds for linux 5.9 changes 17829/head
authorAnita Zhang <the.anitazha@gmail.com>
Wed, 2 Dec 2020 22:41:38 +0000 (14:41 -0800)
committerAnita Zhang <the.anitazha@gmail.com>
Wed, 2 Dec 2020 23:27:15 +0000 (15:27 -0800)
Fixes #17533

The memory pressure values of the units in TEST-56-OOMD seemed to be a
lot lower after updating to linux 5.9. This is likely due to a fix from
https://github.com/torvalds/linux/commit/e22c6ed90aa91abc08f107344428ebb8c2629e98.

To account for this, I lowered memory.high on testbloat.service to
throttle it even more. This was enough to generate the 50%+ value to trigger
oomd for the test, but as an extra precaution I also lowered the oomd
threshold to 1% so it's certain to try and kill testbloat.service.

test/units/testsuite-56-testbloat.service
test/units/testsuite-56-workload.slice
test/units/testsuite-56.sh

index 40cf5a9f36f71d976d1100011ada3e1f439e27cb..6163aae1dbadfaeb6c67f9816be331eccb602736 100644 (file)
@@ -2,8 +2,8 @@
 Description=Create a lot of memory pressure
 
 [Service]
-# A very small memory.high will cause the script (trying to use a lot of memory)
-# to throttle and be put under heavy pressure
-MemoryHigh=2M
+# A VERY small memory.high will cause the script (trying to use a lot of memory)
+# to throttle and be put under heavy pressure.
+MemoryHigh=1M
 Slice=testsuite-56-workload.slice
 ExecStart=/usr/lib/systemd/tests/testdata/units/testsuite-56-slowgrowth.sh
index 3d542ec2baeb45ee688dce01be4940243bae1c23..45b04914c632b62b74a1799188593d03ce2e4c08 100644 (file)
@@ -7,4 +7,4 @@ MemoryAccounting=true
 IOAccounting=true
 TasksAccounting=true
 ManagedOOMMemoryPressure=kill
-ManagedOOMMemoryPressureLimitPercent=50%
+ManagedOOMMemoryPressureLimitPercent=1%
index 37d62d943c0fbb47582a9b948a55d65b68713d88..1846248855b0a205cf5935a6fef9edc79eba1409 100755 (executable)
@@ -19,7 +19,7 @@ systemctl start testsuite-56-testchill.service
 
 # Verify systemd-oomd is monitoring the expected units
 oomctl | grep "/testsuite-56-workload.slice"
-oomctl | grep "50%"
+oomctl | grep "1%"
 
 # 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.