Whamcloud - gitweb
LU-6158 mdt: always shrink_capsule in getxattr_all
[fs/lustre-release.git] / lustre / tests / performance-sanity.sh
1 #!/bin/bash
2 #set -vx
3 set -e
4
5 TESTNAME=`basename $0 .sh`
6 TMP=${TMP:-/tmp}
7 LOG=${LOG:-"$TMP/${TESTNAME}.log"}
8
9 LUSTRE=${LUSTRE:-`dirname $0`/..}
10 . $LUSTRE/tests/test-framework.sh
11 init_test_env $@
12
13 . ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
14 init_logging
15
16 [ -x "$MDSRATE" ] || FAIL_ON_ERROR=true error "No mdsrate program. Aborting."
17 which mpirun > /dev/null 2>&1 || \
18         FAIL_ON_ERROR=true error "No mpirun program. Aborting." 
19
20 # Skip these tests
21 # bug number:  15266 15266 
22 ALWAYS_EXCEPT="1     2    $PERFORMANCE_SANITY_EXCEPT"
23
24 build_test_filter
25
26 get_mpiuser_id $MPI_USER
27 MPI_RUNAS=${MPI_RUNAS:-"runas -u $MPI_USER_UID -g $MPI_USER_GID"}
28 $GSS_KRB5 && refresh_krb5_tgt $MPI_USER_UID $MPI_USER_GID $MPI_RUNAS
29
30 # single-IOR-rates
31 test_1() {
32     echo "Single client I/O performance as a percentage of raw"
33 }
34 run_test 1 "single-client IO perf ====="
35
36 # parallel-IOR-rates 
37 test_2() {
38     echo "MPI coordinated test of parallel filesystem system calls and library functions"
39 }
40 run_test 2 "multi-client IO perf ====="
41
42 # mdsrate-create-small
43 test_3() {
44     echo "File creation performance tests for file objects"
45     bash mdsrate-create-small.sh
46 }
47 run_test 3 "small file create/open/delete ======"
48
49 # mdsrate-create-large
50 test_4() {
51     # LU-2600/LU-4108 - Decrease load on zfs
52     [ "$SLOW" = no -a $(facet_fstype $SINGLEMDS) = zfs ] &&
53         NUM_FILES=10000
54     echo "Large file creation performance"
55     bash mdsrate-create-large.sh
56 }
57 run_test 4 "large file create/open/delete ======"
58
59 # mdsrate-lookup-1dir
60 test_5() {
61     echo "Single directory lookup retrieval rate"
62     bash mdsrate-lookup-1dir.sh
63 }
64 run_test 5 "lookup rate 10M file dir ======"
65
66 # mdsrate-lookup-10dir
67 test_6() {
68     echo "Directory lookup retrieval rate 10 directories, 1 million files each"
69     bash mdsrate-lookup-10dirs.sh
70 }
71 run_test 6 "lookup rate 10M file 10 dir ======"
72
73 # mdsrate-stat-small
74 test_7() {
75     echo "File attribute retrieval rate for small file creation"
76     bash mdsrate-stat-small.sh
77 }
78 run_test 7 "getattr small file ======"
79
80 # mdsrate-stat-large
81 test_8() {
82     echo "File attribute retrieval rate for large file creation"
83     bash mdsrate-stat-large.sh
84 }
85 run_test 8 "getattr large files ======"
86
87 complete $SECONDS
88 check_and_cleanup_lustre
89 [ -f "$LOG" ] && cat $LOG || true
90 exit_status