From 627cc62369fcfda5c8893c2aba4ad721c4ef1996 Mon Sep 17 00:00:00 2001 From: Andreas Dilger Date: Thu, 14 Nov 2024 15:03:43 -0700 Subject: [PATCH] LU-18354 tests: avoid sanity/136 OOM on ZFS servers 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 Change-Id: I4856d80a911eebcfcdaff2d2a1c91ef49645f0b4 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57036 Reviewed-by: Shaun Tancheff Reviewed-by: Olaf Faaland Reviewed-by: Timothy Day Reviewed-by: Oleg Drokin Tested-by: jenkins Tested-by: Maloo --- lustre/tests/sanity.sh | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 66ba3dc..8f34ffa 100755 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -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=$! -- 1.8.3.1