]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: adjust MemoryHigh= on oomd extended test units
authorAnita Zhang <the.anitazha@gmail.com>
Fri, 17 Dec 2021 12:19:53 +0000 (04:19 -0800)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Fri, 17 Dec 2021 16:27:58 +0000 (16:27 +0000)
On some runs `sleep infinity` run by the user manager uses over 3M of
memory, which is higher than the MemoryHigh= set on testbloat and
testmunch. If no pgscan is generated, then systemd-oomd sorts by memory
usage which leads to a situation where testchill (using 3M) could be
targeted over testbloat (1M-2M).

Fix this by setting reasonable MemoryHigh= values for all of these test
units. Even if somehow testchill throttles a bit at 3M, testbloat and
testmunch should still be trying to use over 100M at memory and will
throttle down to 5M and 6M with the new values. This should reflect
the desired state in pgscan and memory usage during the test run.

Fixes #21684

test/units/testsuite-55-testbloat.service
test/units/testsuite-55-testchill.service
test/units/testsuite-55-testmunch.service

index 675273ab47e3b4c2503e6bd00e1d3381079c40f0..8ec535979df75510ced12ba73a77060aa8b37664 100644 (file)
@@ -5,6 +5,6 @@ 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=1M
+MemoryHigh=5M
 Slice=testsuite-55-workload.slice
 ExecStart=/usr/lib/systemd/tests/testdata/units/testsuite-55-slowgrowth.sh
index 49028e8ddc37416808d24e17cefd44cb75945ec9..369b8029d37316b4813cc06c968d1b570fb819b5 100644 (file)
@@ -3,5 +3,6 @@
 Description=No memory pressure
 
 [Service]
+MemoryHigh=3M
 Slice=testsuite-55-workload.slice
 ExecStart=sleep infinity
index 3b649314549f91db794d2a5b839f5cd5749f8159..8820dc06782581f0325a4b57b196c49961426bde 100644 (file)
@@ -3,6 +3,6 @@
 Description=Create some memory pressure
 
 [Service]
-MemoryHigh=2M
+MemoryHigh=6M
 Slice=testsuite-55-workload.slice
 ExecStart=/usr/lib/systemd/tests/testdata/units/testsuite-55-slowgrowth.sh