Whamcloud - gitweb
LU-5810 tests: add client hostname to lctl mark
[fs/lustre-release.git] / lustre / tests / parallel-scale.sh
1 #!/bin/bash
2 #
3 #set -vx
4
5 LUSTRE=${LUSTRE:-$(cd $(dirname $0)/..; echo $PWD)}
6 . $LUSTRE/tests/test-framework.sh
7 init_test_env $@
8 . ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
9 init_logging
10
11 #              bug 20670
12 ALWAYS_EXCEPT="parallel_grouplock $PARALLEL_SCALE_EXCEPT"
13
14 if [ $(facet_fstype $SINGLEMDS) = zfs -o $(facet_fstype "ost1") = zfs ]; then
15         ZFSSLOW=$SLOW
16         SLOW=no
17
18         cbench_IDIRS=${cbench_IDIRS:-1}
19         cbench_RUNS=${cbench_RUNS:-1}
20
21         mdtest_nFiles=${mdtest_nFiles:-"10000"}
22         statahead_NUMFILES=${statahead_NUMFILES:-100000}
23 fi
24
25 # common setup
26 MACHINEFILE=${MACHINEFILE:-$TMP/$(basename $0 .sh).machines}
27 clients=${CLIENTS:-$HOSTNAME}
28 generate_machine_file $clients $MACHINEFILE ||
29     error "Failed to generate machine file"
30 num_clients=$(get_node_count ${clients//,/ })
31
32 # compilbench
33 if [ "$SLOW" = "no" ]; then
34         cbench_IDIRS=${cbench_IDIRS:-2}
35         cbench_RUNS=${cbench_RUNS:-2}
36 fi
37
38 # metabench
39 [ "$SLOW" = "no" ] && mbench_NFILES=${mbench_NFILES:-10000}
40
41 # simul
42 [ "$SLOW" = "no" ] && simul_REP=${simul_REP:-2}
43
44 # connectathon
45 [ "$SLOW" = "no" ] && cnt_NRUN=${cnt_NRUN:-2}
46
47 # cascading rw
48 [ "$SLOW" = "no" ] && casc_REP=${casc_REP:-10}
49
50 # IOR
51 [ "$SLOW" = "no" ] && ior_DURATION=${ior_DURATION:-5}
52
53 # write_append_truncate
54 [ "$SLOW" = "no" ] && write_REP=${write_REP:-100}
55
56 # write_disjoint
57 [ "$SLOW" = "no" ] && wdisjoint_REP=${wdisjoint_REP:-100}
58
59 . $LUSTRE/tests/functions.sh
60
61 build_test_filter
62 check_and_setup_lustre
63
64 get_mpiuser_id $MPI_USER
65 MPI_RUNAS=${MPI_RUNAS:-"runas -u $MPI_USER_UID -g $MPI_USER_GID"}
66 $GSS_KRB5 && refresh_krb5_tgt $MPI_USER_UID $MPI_USER_GID $MPI_RUNAS
67
68 test_compilebench() {
69     run_compilebench
70 }
71 run_test compilebench "compilebench"
72
73 test_metabench() {
74     run_metabench
75 }
76 run_test metabench "metabench"
77
78 test_simul() {
79     run_simul
80 }
81 run_test simul "simul"
82
83 test_mdtestssf() {
84     run_mdtest "ssf"
85 }
86 run_test mdtestssf "mdtestssf"
87
88 test_mdtestfpp() {
89     run_mdtest "fpp"
90 }
91 run_test mdtestfpp "mdtestfpp"
92
93 test_connectathon() {
94     run_connectathon
95 }
96 run_test connectathon "connectathon"
97
98 test_iorssf() {
99     run_ior "ssf"
100 }
101 run_test iorssf "iorssf"
102
103 test_iorfpp() {
104     run_ior "fpp"
105 }
106 run_test iorfpp "iorfpp"
107
108 test_mib() {
109     run_mib
110 }
111 run_test mib "mib"
112
113 test_cascading_rw() {
114     run_cascading_rw
115 }
116 run_test cascading_rw "cascading_rw"
117
118 test_write_append_truncate() {
119     run_write_append_truncate
120 }
121 run_test write_append_truncate "write_append_truncate"
122
123 test_write_disjoint() {
124     run_write_disjoint
125 }
126 run_test write_disjoint "write_disjoint"
127
128 test_parallel_grouplock() {
129     run_parallel_grouplock
130 }
131 run_test parallel_grouplock "parallel_grouplock"
132
133 test_statahead () {
134     run_statahead
135 }
136 run_test statahead "statahead test, multiple clients"
137
138 [ $(facet_fstype $SINGLEMDS) = zfs -o $(facet_fstype "ost1") = zfs ] &&
139         SLOW=$ZFSSLOW
140
141 complete $SECONDS
142 check_and_cleanup_lustre
143 exit_status