Whamcloud - gitweb
LU-427 test: Test failure on test suite lfsck
[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 # common setup
15 #
16 MACHINEFILE=${MACHINEFILE:-$TMP/$(basename $0 .sh).machines}
17 clients=${CLIENTS:-$HOSTNAME}
18 generate_machine_file $clients $MACHINEFILE || \
19     error "Failed to generate machine file"
20 num_clients=$(get_node_count ${clients//,/ })
21
22
23 # compilbench
24 #
25 cbench_DIR=${cbench_DIR:-""}
26 cbench_IDIRS=${cbench_IDIRS:-4}
27 # FIXME: wiki page requirements is 30, do we really need 30 ?
28 cbench_RUNS=${cbench_RUNS:-4}
29
30 if [ "$SLOW" = "no" ]; then
31     cbench_IDIRS=2
32     cbench_RUNS=2
33 fi
34
35 #
36 # metabench
37 #
38 METABENCH=${METABENCH:-$(which metabench 2> /dev/null || true)}
39 mbench_NFILES=${mbench_NFILES:-30400}
40 [ "$SLOW" = "no" ] && mbench_NFILES=10000
41 # threads per client
42 mbench_THREADS=${mbench_THREADS:-4}
43
44 #
45 # simul
46 #
47 SIMUL=${SIMUL:=$(which simul 2> /dev/null || true)}
48 # threads per client
49 simul_THREADS=${simul_THREADS:-2}
50 simul_REP=${simul_REP:-20}
51 [ "$SLOW" = "no" ] && simul_REP=2
52
53 #
54 # mib
55 #
56 MIB=${MIB:=$(which mib 2> /dev/null || true)}
57 # threads per client
58 mib_THREADS=${mib_THREADS:-2}
59 mib_xferSize=${mib_xferSize:-1m}
60 mib_xferLimit=${mib_xferLimit:-5000}
61 mib_timeLimit=${mib_timeLimit:-300}
62
63 #
64 # MDTEST
65 #
66 MDTEST=${MDTEST:=$(which mdtest 2> /dev/null || true)}
67 # threads per client
68 mdtest_THREADS=${mdtest_THREADS:-2}
69 mdtest_nFiles=${mdtest_nFiles:-"100000"}
70 # We devide the files by number of core
71 mdtest_nFiles=$((mdtest_nFiles/mdtest_THREADS/num_clients))
72 mdtest_iteration=${mdtest_iteration:-1}
73
74 #
75 # connectathon
76 #
77 cnt_DIR=${cnt_DIR:-""}
78 cnt_NRUN=${cnt_NRUN:-10}
79 [ "$SLOW" = "no" ] && cnt_NRUN=2
80
81 #
82 # cascading rw
83 #
84 CASC_RW=${CASC_RW:-$(which cascading_rw 2> /dev/null || true)}
85 # threads per client
86 casc_THREADS=${casc_THREADS:-2}
87 casc_REP=${casc_REP:-300}
88 [ "$SLOW" = "no" ] && casc_REP=10
89
90 #
91 # IOR
92 #
93 IOR=${IOR:-$(which IOR 2> /dev/null || true)}
94 # threads per client
95 ior_THREADS=${ior_THREADS:-2}
96 ior_iteration=${ior_iteration:-1}
97 ior_blockSize=${ior_blockSize:-6}       # Gb
98 ior_xferSize=${ior_xferSize:-2m}
99 ior_type=${ior_type:-POSIX}
100 ior_DURATION=${ior_DURATION:-30}        # minutes
101 [ "$SLOW" = "no" ] && ior_DURATION=5
102
103 #
104 # write_append_truncate
105 #
106 # threads per client
107 write_THREADS=${write_THREADS:-8}
108 write_REP=${write_REP:-10000}
109 [ "$SLOW" = "no" ] && write_REP=100
110
111 #
112 # write_disjoint
113 #
114 WRITE_DISJOINT=${WRITE_DISJOINT:-$(which write_disjoint 2> /dev/null || true)}
115 # threads per client
116 wdisjoint_THREADS=${wdisjoint_THREADS:-4}
117 wdisjoint_REP=${wdisjoint_REP:-10000}
118 [ "$SLOW" = "no" ] && wdisjoint_REP=100
119
120 #
121 # parallel_grouplock
122 #
123 #
124 PARALLEL_GROUPLOCK=${PARALLEL_GROUPLOCK:-\
125     $(which parallel_grouplock 2> /dev/null || true)}
126 parallel_grouplock_MINTASKS=${parallel_grouplock_MINTASKS:-5}
127
128 . $LUSTRE/tests/functions.sh
129
130 build_test_filter
131 check_and_setup_lustre
132
133 get_mpiuser_id $MPI_USER
134 MPI_RUNAS=${MPI_RUNAS:-"runas -u $MPI_USER_UID -g $MPI_USER_GID"}
135 $GSS_KRB5 && refresh_krb5_tgt $MPI_USER_UID $MPI_USER_GID $MPI_RUNAS
136
137 test_compilebench() {
138     run_compilebench
139 }
140 run_test compilebench "compilebench"
141
142 test_metabench() {
143     run_metabench
144 }
145 run_test metabench "metabench"
146
147 test_simul() {
148     run_simul
149 }
150 run_test simul "simul"
151
152 test_mdtestssf() {
153     run_mdtest "ssf"
154 }
155 run_test mdtestssf "mdtestssf"
156
157 test_mdtestfpp() {
158     run_mdtest "fpp"
159 }
160 run_test mdtestfpp "mdtestfpp"
161
162 test_connectathon() {
163     run_connectathon
164 }
165 run_test connectathon "connectathon"
166
167 test_iorssf() {
168     run_ior "ssf"
169 }
170 run_test iorssf "iorssf"
171
172 test_iorfpp() {
173     run_ior "fpp"
174 }
175 run_test iorfpp "iorfpp"
176
177 test_mib() {
178     run_mib
179 }
180 run_test mib "mib"
181
182 test_cascading_rw() {
183     run_cascading_rw
184 }
185 run_test cascading_rw "cascading_rw"
186
187 test_write_append_truncate() {
188     run_write_append_truncate
189 }
190 run_test write_append_truncate "write_append_truncate"
191
192 test_write_disjoint() {
193     run_write_disjoint
194 }
195 run_test write_disjoint "write_disjoint"
196
197 test_parallel_grouplock() {
198     run_parallel_grouplock
199 }
200 run_test parallel_grouplock "parallel_grouplock"
201
202 statahead_NUMMNTPTS=${statahead_NUMMNTPTS:-5}
203 statahead_NUMFILES=${statahead_NUMFILES:-500000}
204
205 test_statahead () {
206     run_statahead
207 }
208 run_test statahead "statahead test, multiple clients"
209
210 complete $(basename $0) $SECONDS
211 check_and_cleanup_lustre
212 exit_status