5 TESTNAME=$(basename $0 .sh)
6 LOG=${LOG:-"$TMP/${TESTNAME}.log"}
8 LUSTRE=${LUSTRE:-$(dirname $0)/..}
9 . $LUSTRE/tests/test-framework.sh
13 ALWAYS_EXCEPT="$PERFORMANCE_SANITY_EXCEPT "
16 check_and_setup_lustre
20 [[ -x "$MPIRUN" ]] || skip_env "no mpirun program found"
21 [[ -x "$MDTEST" ]] || skip_env "no mdtest program found"
22 get_mpiuser_id $MPI_USER
23 MPI_RUNAS=${MPI_RUNAS:-"runas -u $MPI_USER_UID -g $MPI_USER_GID"}
24 $GSS_KRB5 && refresh_krb5_tgt $MPI_USER_UID $MPI_USER_GID $MPI_RUNAS
29 echo "Small files creation performance test"
30 # LU-2600/LU-4108 - Decrease load on zfs
31 if [[ "$SLOW" == no && "$mds1_FSTYPE" == zfs ]]; then
34 run_mdtest create-small
36 run_test 1 "small files create/open/delete"
40 echo "Large files creation performance test"
41 run_mdtest create-large
43 run_test 2 "large files create/open/delete"
49 echo "Single directory lookup rate for $NUM_FILES files"
50 run_mdtest lookup-single
52 run_test 3 "lookup rate 200k files in single directory"
58 echo "Directory lookup rate $NUM_DIRS directories, $((NUM_FILES/NUM_DIRS)) files each"
59 run_mdtest lookup-multi
61 run_test 4 "lookup rate 200k files in 100 directories"
65 for((i=0; i < 20001; i++)) {
66 echo "W$((i * 10)), 5"
67 [ $i -eq 20000 ] && echo "T5" && continue
68 } | flocks_test 6 $DIR/$tfile
71 run_test 5a "enqueue 20k no overlap flocks on same file"
75 for((i=0; i < 20001; i++)) {
76 [ $i -eq 0 ] && echo "W0,99999999" && continue
77 echo "R$((i * 10)), 5"
78 [ $i -eq 20000 ] && echo "T5" && continue
79 } | flocks_test 6 $DIR/$tfile
82 run_test 5b "split a flock 20k times"
86 for((i=0; i < 20001; i++)) {
87 echo "R$((i * 10)), 5"
88 [ $i -eq 20000 ] && echo "W0,99999999" && echo "T0" && continue
89 } | flocks_test 6 $DIR/$tfile
92 run_test 5c "merge 20k flocks"
98 for((i=0; i < 20001; i++)) {
100 echo "R400, $((100 + v))"
101 [ $i -eq 0 -a $v -eq 0 ] && echo "S20100"
102 [ $i -eq 20000 ] && {
104 [ $v -eq 1 ] && break
108 } | flocks_test 6 $DIR/$tfile
111 run_test 5d "Enqueue 20k same range flocks, then expand them"
113 complete_test $SECONDS
114 check_and_cleanup_lustre