From: Andreas Dilger Date: Tue, 15 Oct 2013 16:05:50 +0000 (-0600) Subject: LU-4018 tests: improve racer file_create workload X-Git-Tag: 2.6.0-RC1~37 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=6acd28ed6ce281843b2bf2892ffa0e8725d08f3a;ds=inline LU-4018 tests: improve racer file_create workload Use larger writes and smaller files, so that the racer file_create.sh workload does not get bogged down with many threads stuck on sub-page writes to the same file (causing excruciating 1kB-per-RPC sync writes to disk on the OST). Signed-off-by: Andreas Dilger Change-Id: I173c155dfe4044f89deb8f2d8a7c3be4a28ce763 Reviewed-on: http://review.whamcloud.com/7951 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: James Nunez Reviewed-by: John L. Hammond Reviewed-by: Oleg Drokin --- diff --git a/lustre/tests/racer/file_create.sh b/lustre/tests/racer/file_create.sh index 828e69c..e615365 100755 --- a/lustre/tests/racer/file_create.sh +++ b/lustre/tests/racer/file_create.sh @@ -2,16 +2,17 @@ DIR=$1 MAX=$2 -MAX_MB=256 +MAX_MB=${RACER_MAX_MB:-8} OSTCOUNT=${OSTCOUNT:-$(lfs df $DIR 2> /dev/null | grep -c OST)} while /bin/true ; do file=$((RANDOM % MAX)) - SIZE=$((RANDOM * MAX_MB / 32)) - echo "file_create: FILE=$DIR/$file SIZE=$SIZE" + # $RANDOM is between 0 and 32767, and we want $blockcount in 64kB units + blockcount=$((RANDOM * MAX_MB / 32 / 64)) + stripecount=$((RANDOM % (OSTCOUNT + 1))) [ $OSTCOUNT -gt 0 ] && - lfs setstripe -c $((RANDOM % OSTCOUNT)) $DIR/$file 2> /dev/null - dd if=/dev/zero of=$DIR/$file bs=1k count=$SIZE 2> /dev/null + lfs setstripe -c $stripecount $DIR/$file 2> /dev/null + dd if=/dev/zero of=$DIR/$file bs=64k count=$blockcount 2> /dev/null done diff --git a/lustre/tests/racer/racer.sh b/lustre/tests/racer/racer.sh index 6ba8b7c..1da6465 100755 --- a/lustre/tests/racer/racer.sh +++ b/lustre/tests/racer/racer.sh @@ -23,7 +23,7 @@ racer_cleanup() { echo "racer cleanup" for P in $RACER_PROGS; do - killall $P.sh + killall -q $P.sh done trap 0 @@ -43,14 +43,14 @@ racer_cleanup() done if [[ $rc -eq 0 ]]; then echo there should be NO racer processes: - ps aux | grep -E "${RACER_PROGS// /|}" + ps uww -C "${RACER_PROGS// /,}" return 0 fi echo -n "Waited $(( TOT_WAIT + SHORT_WAIT)), rc=$rc " (( SHORT_WAIT+=SHORT_WAIT )) (( TOT_WAIT+=SHORT_WAIT )) done - ps aux | grep -E "${RACER_PROGS// /|}" + ps uww -C "${RACER_PROGS// /,}" return 1 } @@ -76,7 +76,5 @@ racer_cleanup || RC=$? # Check our to see whether our test DIR is still available. df $DIR (( RC+=$? )) -if [ $RC -eq 0 ]; then - echo "We survived $0 for $DURATION seconds." -fi +[ $RC -eq 0 ] && echo "We survived $0 for $DURATION seconds." exit $RC