X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;ds=sidebyside;f=lustre%2Ftests%2Fperformance-sanity.sh;h=cc27c3eeed5cc77ace22eb2d55866250aa077cb1;hb=HEAD;hp=1846fd820c0cd7848ee8abb3a43330e4848f7493;hpb=4e630228f68eefa6729b9d2ff3c3e7ace2b11f9a;p=fs%2Flustre-release.git diff --git a/lustre/tests/performance-sanity.sh b/lustre/tests/performance-sanity.sh index 1846fd8..ba3833a 100644 --- a/lustre/tests/performance-sanity.sh +++ b/lustre/tests/performance-sanity.sh @@ -1,82 +1,94 @@ #!/bin/bash -#set -vx + set -e -TESTNAME=`basename $0 .sh` -TMP=${TMP:-/tmp} +TESTNAME=$(basename $0 .sh) LOG=${LOG:-"$TMP/${TESTNAME}.log"} -LUSTRE=${LUSTRE:-`dirname $0`/..} +LUSTRE=${LUSTRE:-$(dirname $0)/..} . $LUSTRE/tests/test-framework.sh -init_test_env $@ - -. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh} +init_test_env "$@" +init_logging -[ -x "$MDSRATE" ] || FAIL_ON_ERROR=true error "No mdsrate program. Aborting." -which mpirun > /dev/null 2>&1 || \ - FAIL_ON_ERROR=true error "No mpirun program. Aborting." +ALWAYS_EXCEPT="$PERFORMANCE_SANITY_EXCEPT " +build_test_filter -# Skip these tests -# bug number: 15266 15266 -ALWAYS_EXCEPT="1 2 $PERFORMANCE_SANITY_EXCEPT" +check_and_setup_lustre -build_test_filter +env_verify() +{ + [[ -x "$MPIRUN" ]] || skip_env "no mpirun program found" + [[ -x "$MDTEST" ]] || skip_env "no mdtest program found" + get_mpiuser_id $MPI_USER + MPI_RUNAS=${MPI_RUNAS:-"runas -u $MPI_USER_UID -g $MPI_USER_GID"} + $GSS_KRB5 && refresh_krb5_tgt $MPI_USER_UID $MPI_USER_GID $MPI_RUNAS +} -# single-IOR-rates test_1() { - echo "Single client I/O performance as a percentage of raw" + env_verify + echo "Small files creation performance test" + # LU-2600/LU-4108 - Decrease load on zfs + if [[ "$SLOW" == no && "$mds1_FSTYPE" == zfs ]]; then + NUM_FILES=10000 + fi + run_mdtest create-small } -run_test 1 "single-client IO perf =====" +run_test 1 "small files create/open/delete" -# parallel-IOR-rates test_2() { - echo "MPI coordinated test of parallel filesystem system calls and library functions" + env_verify + echo "Large files creation performance test" + run_mdtest create-large } -run_test 2 "multi-client IO perf =====" +run_test 2 "large files create/open/delete" -# mdsrate-create-small test_3() { - echo "File creation performance tests for file objects" - bash mdsrate-create-small.sh + env_verify + NUM_DIRS=1 + NUM_FILES=200000 + echo "Single directory lookup rate for $NUM_FILES files" + run_mdtest lookup-single } -run_test 3 "small file create/open/delete ======" +run_test 3 "lookup rate 200k files in single directory" -# mdsrate-create-large test_4() { - echo "Large file creation performance" - bash mdsrate-create-large.sh + env_verify + NUM_DIRS=100 + NUM_FILES=200000 + echo "Directory lookup rate $NUM_DIRS directories, $((NUM_FILES/NUM_DIRS)) files each" + run_mdtest lookup-multi } -run_test 4 "large file create/open/delete ======" +run_test 4 "lookup rate 200k files in 100 directories" -# mdsrate-lookup-1dir test_5() { - echo "Single directory lookup retrieval rate" - bash mdsrate-lookup-1dir.sh + touch $DIR/$tfile + for((i=0; i < 20000; i++)) { + echo "W$((i * 10)), 5" + } | flocks_test 6 $DIR/$tfile + rm -r $DIR/$tfile } -run_test 5 "lookup rate 10M file dir ======" +run_test 5 "enqueue 20k no overlap flocks on same file" -# mdsrate-lookup-10dir test_6() { - echo "Directory lookup retrieval rate 10 directories, 1 million files each" - bash mdsrate-lookup-10dirs.sh + touch $DIR/$tfile + for((i=0; i < 20000; i++)) { + [ $i -eq 0 ] && echo "W0,99999999" && continue + echo "R$((i * 10)), 5" + } | flocks_test 6 $DIR/$tfile + rm -r $DIR/$tfile } -run_test 6 "lookup rate 10M file 10 dir ======" +run_test 6 "split a flock 20k times" -# mdsrate-stat-small test_7() { - echo "File attribute retrieval rate for small file creation" - bash mdsrate-stat-small.sh -} -run_test 7 "getattr small file ======" - -# mdsrate-stat-large -test_8() { - echo "File attribute retrieval rate for large file creation" - bash mdsrate-stat-large.sh + touch $DIR/$tfile + for((i=0; i < 20001; i++)) { + echo "R$((i * 10)), 5" + [ $i -eq 20000 ] && echo "W0,99999999" && continue + } | flocks_test 6 $DIR/$tfile + rm -r $DIR/$tfile } -run_test 8 "getattr large files ======" +run_test 7 "merge 20k flocks" -equals_msg `basename $0`: test complete, cleaning up +complete_test $SECONDS check_and_cleanup_lustre -[ -f "$LOG" ] && cat $LOG || true -[ -f "$TESTSUITELOG" ] && cat $TESTSUITELOG && grep -q FAIL $TESTSUITELOG && exit 1 || true +exit_status