summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
65ec69f)
There are two fix/improvements in sgpdd-survey.
(1) adding --lba option to sg_readcap for large LUNs.
(2) support configurable boundadry block size between
concurrent regions per device.
Signed-off-by: Shuichi Ihara <sihara@ddn.com>
Change-Id: Ib3cdb051cf55e096919ad63a42640aaacfe511c4
Reviewed-on: http://review.whamcloud.com/1658
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Cliff White <cliffw@whamcloud.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
crglo=${crglo:-1}
crghi=${crghi:-256}
crglo=${crglo:-1}
crghi=${crghi:-256}
+# boundary blocks between concurrent regions per device
+boundary=${boundary:-1024}
+
# threads to share between concurrent regions per device
# multiple threads per region simulates a deeper request queue
# NB survey skips over #thr < #regions and #thr/#regions > SG_MAX_QUEUE
# threads to share between concurrent regions per device
# multiple threads per region simulates a deeper request queue
# NB survey skips over #thr < #regions and #thr/#regions > SG_MAX_QUEUE
# determine block size. This should also work for raw devices
# If it fails, set to 512
# determine block size. This should also work for raw devices
# If it fails, set to 512
-bs=$((`sg_readcap -b ${devs[0]} | awk '{print $2}'`))
+bs=$((`sg_readcap -lb ${devs[0]} | awk '{print $2}'`))
if [ $bs == 0 ];then
echo "sg_readcap failed, setting block size to 512"
bs=512
if [ $bs == 0 ];then
echo "sg_readcap failed, setting block size to 512"
bs=512
t0=`date +%s.%N`
for ((i=0;i<ndevs;i++)); do
dev=${devs[i]}
t0=`date +%s.%N`
for ((i=0;i<ndevs;i++)); do
dev=${devs[i]}
- devsize=$((bs*`sg_readcap -b ${dev} | awk '{print $1}'`/1024))
+ devsize=$((bs*`sg_readcap -lb ${dev} | awk '{print $1}'`/1024))
if [ $devsize -lt $actual_size ]; then
_dev=$(sg_map | grep $dev | awk '{ print $2; }')
echo -e "device $_dev not big enough: $devsize <" \
if [ $devsize -lt $actual_size ]; then
_dev=$(sg_map | grep $dev | awk '{ print $2; }')
echo -e "device $_dev not big enough: $devsize <" \
fi
for ((j=0;j<crg;j++)); do
sgp_dd 2> ${tmpf}_${i}_${j} \
fi
for ((j=0;j<crg;j++)); do
sgp_dd 2> ${tmpf}_${i}_${j} \
- $inf $outf ${skip}=$((1024+j*blocks)) \
+ $inf $outf ${skip}=$((boundary+j*blocks)) \
thr=$((thr/crg)) count=$count bs=$bs bpt=$bpt time=1&
done
done
thr=$((thr/crg)) count=$count bs=$bs bpt=$bpt time=1&
done
done