5 TESTNAME=$(basename $0 .sh)
6 LOG=${LOG:-"$TMP/${TESTNAME}.log"}
7 MOUNT_2=${MOUNT_2:-"yes"}
9 LUSTRE=${LUSTRE:-$(dirname $0)/..}
10 . $LUSTRE/tests/test-framework.sh
14 ALWAYS_EXCEPT="$PERFORMANCE_SANITY_EXCEPT "
17 check_and_setup_lustre
19 CLIENTS=${CLIENTS:-$HOSTNAME}
23 [[ -x "$MPIRUN" ]] || skip_env "no mpirun program found"
24 [[ -x "$MDTEST" ]] || skip_env "no mdtest program found"
25 get_mpiuser_id $MPI_USER
26 MPI_RUNAS=${MPI_RUNAS:-"runas -u $MPI_USER_UID -g $MPI_USER_GID"}
27 $GSS_KRB5 && refresh_krb5_tgt $MPI_USER_UID $MPI_USER_GID $MPI_RUNAS
32 echo "Small files creation performance test"
33 run_mdtest create-small
35 run_test 1 "small files create/open/delete"
39 echo "Large files creation performance test"
40 # LU-2600/LU-4108 - Decrease load on zfs
41 if [[ "$SLOW" == no && "$mds1_FSTYPE" == zfs ]]; then
44 run_mdtest create-large
46 run_test 2 "large files create/open/delete"
52 echo "Single directory lookup rate for $NUM_FILES files"
53 run_mdtest lookup-single
55 run_test 3 "lookup rate 200k files in single directory"
61 echo "Directory lookup rate $NUM_DIRS directories, $((NUM_FILES/NUM_DIRS)) files each"
62 run_mdtest lookup-multi
64 run_test 4 "lookup rate 200k files in 100 directories"
67 local tmpfile=$DIR/$tfile
69 for((i=0; i < 20001; i++)) {
70 echo "R$((i * 10)), 5"
72 stack_trap "rm $tmpfile || true" EXIT
74 do_nodes $CLIENTS flocks_test 6 $DIR/$tfile $tmpfile &
75 do_nodes $CLIENTS flocks_test 6 $DIR2/$tfile $tmpfile &
76 wait || error "flocks_test failed"
78 run_test 5a "enqueue 20k no overlap flocks on same file"
81 local tmpfile=$DIR/$tfile
83 echo "W0,99999999" > $tmpfile
84 for((i=0; i < 20001; i++)) {
85 echo "R$((i * 10)), 5"
87 stack_trap "rm $tmpfile || true" EXIT
89 do_nodes $CLIENTS flocks_test 6 $DIR/$tfile $tmpfile &
90 do_nodes $CLIENTS flocks_test 6 $DIR2/$tfile $tmpfile &
91 wait || error "flocks_test failed"
93 run_test 5b "split a flock 20k times"
96 local tmpfile=$DIR/$tfile
98 for((i=0; i < 20001; i++)) {
99 echo "R$((i * 10)), 5"
101 echo -e "R0,99999999\nT0" >> $tmpfile
102 stack_trap "rm $tmpfile || true" EXIT
104 do_nodes $CLIENTS flocks_test 6 $DIR/$tfile $tmpfile &
105 do_nodes $CLIENTS flocks_test 6 $DIR2/$tfile $tmpfile &
106 wait || error "flocks_test failed"
108 run_test 5c "merge 20k flocks"
111 local tmpfile=$DIR/$tfile
113 echo "S20100" > $tmpfile
114 for((i=0; i < 20000; i++)) {
115 echo -e "F$i\nR400, 100"
117 for((i=0; i < 20000; i++)) {
118 echo -e "F$i\nR400, 101"
120 stack_trap "rm $tmpfile || true" EXIT
122 do_nodes $CLIENTS flocks_test 6 $DIR/$tfile $tmpfile &
123 do_nodes $CLIENTS flocks_test 6 $DIR2/$tfile $tmpfile &
124 wait || error "flocks_test failed"
126 run_test 5d "Enqueue 20k same range flocks, then expand them"
128 complete_test $SECONDS
129 check_and_cleanup_lustre