Whamcloud - gitweb
b=21115
[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
15 [ -x "$MDSRATE" ] || FAIL_ON_ERROR=true error "No mdsrate program. Aborting."
16 which mpirun > /dev/null 2>&1 || \
17         FAIL_ON_ERROR=true error "No mpirun program. Aborting." 
18
19 # Skip these tests
20 # bug number:  15266 15266 
21 ALWAYS_EXCEPT="1     2    $PERFORMANCE_SANITY_EXCEPT"
22
23 build_test_filter
24
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
28
29 # single-IOR-rates
30 test_1() {
31     echo "Single client I/O performance as a percentage of raw"
32 }
33 run_test 1 "single-client IO perf ====="
34
35 # parallel-IOR-rates 
36 test_2() {
37     echo "MPI coordinated test of parallel filesystem system calls and library functions"
38 }
39 run_test 2 "multi-client IO perf ====="
40
41 # mdsrate-create-small
42 test_3() {
43     echo "File creation performance tests for file objects"
44     bash mdsrate-create-small.sh
45 }
46 run_test 3 "small file create/open/delete ======"
47
48 # mdsrate-create-large
49 test_4() {
50     echo "Large file creation performance"
51     bash mdsrate-create-large.sh
52 }
53 run_test 4 "large file create/open/delete ======"
54
55 # mdsrate-lookup-1dir
56 test_5() {
57     echo "Single directory lookup retrieval rate"
58     bash mdsrate-lookup-1dir.sh
59 }
60 run_test 5 "lookup rate 10M file dir ======"
61
62 # mdsrate-lookup-10dir
63 test_6() {
64     echo "Directory lookup retrieval rate 10 directories, 1 million files each"
65     bash mdsrate-lookup-10dirs.sh
66 }
67 run_test 6 "lookup rate 10M file 10 dir ======"
68
69 # mdsrate-stat-small
70 test_7() {
71     echo "File attribute retrieval rate for small file creation"
72     bash mdsrate-stat-small.sh
73 }
74 run_test 7 "getattr small file ======"
75
76 # mdsrate-stat-large
77 test_8() {
78     echo "File attribute retrieval rate for large file creation"
79     bash mdsrate-stat-large.sh
80 }
81 run_test 8 "getattr large files ======"
82
83 equals_msg `basename $0`: test complete, cleaning up
84 check_and_cleanup_lustre
85 [ -f "$LOG" ] && cat $LOG || true
86 [ -f "$TESTSUITELOG" ] && cat $TESTSUITELOG && grep -q FAIL $TESTSUITELOG && exit 1 || true