Whamcloud - gitweb
LU-17038 tests: remove mlink utility
[fs/lustre-release.git] / lustre / tests / performance-sanity.sh
1 #!/bin/bash
2
3 set -e
4
5 TESTNAME=$(basename $0 .sh)
6 LOG=${LOG:-"$TMP/${TESTNAME}.log"}
7
8 LUSTRE=${LUSTRE:-$(dirname $0)/..}
9 . $LUSTRE/tests/test-framework.sh
10 init_test_env "$@"
11 init_logging
12
13 ALWAYS_EXCEPT="$PERFORMANCE_SANITY_EXCEPT "
14 build_test_filter
15
16 [[ -x "$MPIRUN" ]] || skip_env "no mpirun program found"
17 [[ -x "$MDTEST" ]] || skip_env "no mdtest program found"
18
19 check_and_setup_lustre
20
21 get_mpiuser_id $MPI_USER
22 MPI_RUNAS=${MPI_RUNAS:-"runas -u $MPI_USER_UID -g $MPI_USER_GID"}
23 $GSS_KRB5 && refresh_krb5_tgt $MPI_USER_UID $MPI_USER_GID $MPI_RUNAS
24
25 test_1() {
26         echo "Small files creation performance test"
27         # LU-2600/LU-4108 - Decrease load on zfs
28         if [[ "$SLOW" == no && "$mds1_FSTYPE" == zfs ]]; then
29                 NUM_FILES=10000
30         fi
31         run_mdtest create-small
32 }
33 run_test 1 "small files create/open/delete"
34
35 test_2() {
36         echo "Large files creation performance test"
37         run_mdtest create-large
38 }
39 run_test 2 "large files create/open/delete"
40
41 test_3() {
42         NUM_DIRS=1
43         NUM_FILES=200000
44         echo "Single directory lookup rate for $NUM_FILES files"
45         run_mdtest lookup-single
46 }
47 run_test 3 "lookup rate 200k files in single directory"
48
49 test_4() {
50         NUM_DIRS=100
51         NUM_FILES=200000
52         echo "Directory lookup rate $NUM_DIRS directories, $((NUM_FILES/NUM_DIRS)) files each"
53         run_mdtest lookup-multi
54 }
55 run_test 4 "lookup rate 200k files in 100 directories"
56
57 complete_test $SECONDS
58 check_and_cleanup_lustre
59 exit_status