-
-for ((rsz=$rszlo;rsz<=$rszhi;rsz*=2)); do
- for ((nobj=$nobjlo;nobj<=$nobjhi;nobj*=2)); do
- for ((thr=$thrlo;thr<=$thrhi;thr*=2)); do
- if ((thr < nobj)); then
- continue
- fi
- # restart?
- if [ -n "$restart_rsz" -a\
- -n "$restart_nobj" -a\
- -n "$restart_thr" ]; then
- if ((rsz < restart_rsz ||\
- (rsz == restart_rsz &&\
- (nobj < restart_nobj ||\
- (nobj == restart_nobj &&\
- thr < restart_thr))))); then
- continue;
- fi
- fi
- # compute parameters
- total_thr=$((ndevs*thr))
- total_nobj=$((ndevs*nobj))
- pages=$((rsz/PAGE_SIZE))
- actual_rsz=$((pages*PAGE_SIZE))
- count=$((size*1024/(actual_rsz*thr)))
- actual_size=$((actual_rsz*count*thr))
- total_size=$((actual_size*ndevs))
- # show computed parameters
- str=`printf 'ost %2d sz %8dK rsz %4d obj %4d thr %4d ' \
- $ndevs $total_size $actual_rsz $total_nobj $total_thr`
- echo "=======================> $str" >> $workf
- print_summary -n "$str"
- if ((total_thr * actual_rsz > max_buffer_mem)); then
- print_summary "Too much buffer space"
- continue
- fi
- # create the objects
- tmpf="${workf}_tmp"
- for ((idx=0; idx < ndevs; idx++)); do
- host=${host_names[$idx]}
- devno=${devnos[$idx]}
- client_name="${host}:${client_names[$idx]}"
- echo "=============> Create $nobj on $client_name" >> $workf
- first_obj=`create_objects $host $devno $nobj $tmpf`
- cat $tmpf >> $workf
- rm $tmpf
- if [ $first_obj = "ERROR" ]; then
- print_summary "created object #s on $client_name not contiguous"
- exit 1
- fi
- first_objs[$idx]=$first_obj
- done
- # run tests
- for test in ${tests[@]}; do
+if (($ndevs <= 0 || ${#host_names[@]} <= 0)); then
+ echo "no devices or hosts specified"
+ cleanup 0 $clean_srv_OSS $cleanup_oscs
+fi
+# Buffers will be spread out among all hosts, so allow for that
+max_buffer_mem=$(( ${max_buffer_mem} * ${#unique_hosts[@]} ))
+print_summary "$(date) Obdfilter-survey for case=$case from $(hostname)"
+for ((rsz = $rszlo; rsz <= $rszhi; rsz*=2)); do
+ for ((nobj = $nobjlo; nobj <= $nobjhi; nobj*=2)); do
+ for ((thr = $thrlo; thr <= $thrhi; thr*=2)); do
+ if ((thr % nobj)); then
+ continue
+ fi
+ # restart?
+ if [ -n "$restart_rsz" -a\
+ -n "$restart_nobj" -a\
+ -n "$restart_thr" ]; then
+ if ((rsz < restart_rsz ||\
+ (rsz == restart_rsz &&\
+ (nobj < restart_nobj ||\
+ (nobj == restart_nobj &&\
+ thr < restart_thr))))); then
+ continue;
+ fi
+ fi
+ # compute parameters
+ total_thr=$((ndevs*thr))
+ total_nobj=$((ndevs*nobj))
+ pages=$((rsz/PAGE_SIZE))
+ actual_rsz=$((pages*PAGE_SIZE))
+ count=$((size*1024/(actual_rsz*thr)))
+ actual_size=$((actual_rsz*count*thr))
+ total_size=$((actual_size*ndevs))
+ # show computed parameters
+ str=`printf 'ost %2d sz %8dK rsz %4dK obj %4d thr %4d ' \
+ $ndevs $total_size $actual_rsz $total_nobj $total_thr`
+ echo "=======================> $str" >> $workf
+ print_summary -n "$str"
+ if ((total_thr * actual_rsz > max_buffer_mem)); then
+ print_summary "Too much buffer space"
+ continue
+ fi
+ # create the objects
+ tmpf="${workf}_tmp"
+ for ((idx = 0; idx < $ndevs; idx++)); do
+ host=${host_names[$idx]}
+ devno=${devnos[$idx]}
+ client_name="${host}:${client_names[$idx]}"
+ echo "=============> Create $nobj on $client_name" >> $workf
+ first_obj=`create_objects $host $devno $nobj $tmpf`
+ cat $tmpf >> $workf
+ rm $tmpf
+ if [ $first_obj = "ERROR" ]; then
+ print_summary "created object #s on $client_name not contiguous"
+ exit 1
+ fi
+ first_objs[$idx]=$first_obj
+ done
+ # run tests
+ for test in ${tests[@]}; do