Whamcloud - gitweb
LU-18354 tests: avoid sanity/136 OOM on ZFS servers 36/57036/2
authorAndreas Dilger <adilger@whamcloud.com>
Thu, 14 Nov 2024 22:03:43 +0000 (15:03 -0700)
committerOleg Drokin <green@whamcloud.com>
Mon, 2 Dec 2024 05:56:21 +0000 (05:56 +0000)
Creating 150k files in sanity test_136 is causing OOM issues on
ZFS servers.  I'm not sure what might be causing that, but it is
disruptive to all patch review testing.  Rather than stop testing
on ZFS it is better to flush memory periodically on the MDS so the
test can continue to test the intended changelog functionality.

Test-Parameters: trivial
Test-Parameters: testlist=sanity env=ONLY=136,SLOW=yes,ONLY_MINUTES=60 fstype=zfs
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I4856d80a911eebcfcdaff2d2a1c91ef49645f0b4
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57036
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Olaf Faaland <faaland1@llnl.gov>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/tests/sanity.sh

index 66ba3dc..8f34ffa 100755 (executable)
@@ -17552,18 +17552,21 @@ test_136() {
 
        ost_set_temp_seq_width_all $DATA_SEQ_MAX_WIDTH
 
-       #fill already existed 2 plain llogs each 64767
-       #wrapping whole catalog
-       createmany -o -u $DIR/$tdir/$tfile- $((64767 * 1))
-       createmany -o -u $DIR/$tdir/$tfile- $((64767 * 3 / 2))
-       wait_delete_completed
+       # fill already existed 2 plain llogs each 64767 wrapping whole catalog,
+       # drop server memory periodically to avoid OOM during testing
+       local items=1000
+       for ((created = 0; created < 64767 * 5 / 2; created += items)); do
+               echo "$(date +%s): create $created-$((created + items - 1))"
+               createmany -o -u $DIR/$tdir/$tfile- $items
+               wait_delete_completed
+               do_facet mds1 "echo 1 > /proc/sys/vm/drop_caches"
+       done
 
        createmany -o $DIR/$tdir/$tfile_ 10
        sleep 25
 
        do_facet $SINGLEMDS $LCTL set_param fail_val=3
-       for (( i = 0; i < 10; i = i + 3 ))
-       do
+       for (( i = 0; i < 10; i = i + 3 )); do
                rm $DIR/$tdir/$tfile_$i &
                rm $DIR/$tdir/$tfile_$((i + 1)) &
                local pid=$!