#!/bin/bash
-set -e
######################################################################
# customize per survey
restart_nobj=1
# machine's page size (KB)
-PAGE_SIZE=${PAGE_SIZE:-$(($(getconf PAGE_SIZE) / 1024))}
-PAGE_SIZE=${PAGE_SIZE:-4}
+PAGE_SIZE_KB=${PAGE_SIZE_KB:-$(( ${PAGE_SIZE:-$(getconf PAGE_SIZE)} / 1024))}
+PAGE_SIZE_KB=${PAGE_SIZE_KB:-4}
snap=1
clean_srv_OSS=0
host=${host_names[$i]}
devno=($(get_ec_devno $host "${client_names[$i]}" "${ost_names[$i]}"))
if ((${#devno[@]} != 3)); then
- exit 1
+ cleanup 2
fi
devnos[$i]=${devno[0]}
client_names[$i]=${devno[1]}
# compute parameters
total_thr=$((ndevs * thr))
total_nobj=$((ndevs * nobj))
- pages=$((rsz / PAGE_SIZE))
- actual_rsz=$((pages * PAGE_SIZE))
+ pages=$(( (rsz + PAGE_SIZE_KB - 1) / PAGE_SIZE_KB))
+ actual_rsz=$((pages * PAGE_SIZE_KB))
count=$((size * 1024 / (actual_rsz * thr)))
actual_size=$((actual_rsz * count * thr))
total_size=$((actual_size * ndevs))
rm $tmpf
if [ $first_obj = "ERROR" ]; then
print_summary "created object #s on $client_name not contiguous"
- exit 1
+ cleanup 3
fi
first_objs[$idx]=$first_obj
done # $ndevs
declare -a pidarray
for host in ${unique_hosts[@]}; do
remote_shell $host \
- "lctl set_param -n osd*.*OST*.force_sync 1 &>/dev/null || true"
+ "lctl set_param -n osd*.*.force_sync 1 &>/dev/null || true"
echo "starting run for test: $test rsz: $rsz " \
"threads: $thr objects: $nobj" >> ${vmstatf}_${host}
done