X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre-iokit%2Fsgpdd-survey%2Fsgpdd-survey;h=52207f142a71c0243dbe895cb82e35fd648c604e;hp=0b1fdc6858fb2dbb17c0beee904b810975468633;hb=b8c8ad79dcd4a30bfc839d87f7a983c400d3e327;hpb=c4d3d5017e04c13562e148e1fb74202c3b318ffa diff --git a/lustre-iokit/sgpdd-survey/sgpdd-survey b/lustre-iokit/sgpdd-survey/sgpdd-survey index 0b1fdc6..52207f1 100755 --- a/lustre-iokit/sgpdd-survey/sgpdd-survey +++ b/lustre-iokit/sgpdd-survey/sgpdd-survey @@ -6,9 +6,9 @@ # the SCSI devices to measure scsidevs="/dev/sde /dev/sdh" -# result file prefix +# result file prefix. date/time+hostname makes unique # NB ensure the path exists if it includes subdirs -rslt=/tmp/sg_dd_rslt +rslt=/tmp/sgpdd_survey_`date +%F@%R`_`uname -n` # what to do (read or write) actions="write read" @@ -26,18 +26,19 @@ crglo=1 crghi=256 # threads to share between concurrent regions per device -# NB survey skips over #thr < #regions and #thr > SG_MAX_QUEUE +# NB survey skips over #thr < #regions and #thr/#regions > SG_MAX_QUEUE thrlo=1 -thrhi=8192 +thrhi=4096 ##################################################################### +# leave the rest of this alone unless you know what you're doing... -# disk block size (Bytes) +# sgp_dd's idea of disk sector size (Bytes) bs=512 - -# max # threads per individual sgp_dd instance +# and max # threads one instance will spawn SG_MAX_QUEUE=16 +# map given device names into SG device names i=0 devs=() for d in $scsidevs; do @@ -50,12 +51,10 @@ for d in $scsidevs; do done ndevs=${#devs[@]} -start=`date +%F@%R` -rsltf=${rslt}_${start}.summary +rsltf=${rslt}.summary +workf=${rslt}.detail echo -n > $rsltf -workf=${rslt}_${start}.detail echo -n > $workf -tmpf=${rslt}_${start}.tmp print_summary () { if [ "$1" = "-n" ]; then @@ -80,7 +79,7 @@ for ((rsz=$rszlo;rsz<=$rszhi;rsz*=2)); do # show computed parameters actual_rsz=$((bpt*bs/1024)) actual_size=$((bs*count*crg/1024)) - str=`printf 'total_size %8dK rsz %4d crg %5d thr %3d ' \ + str=`printf 'total_size %8dK rsz %4d crg %5d thr %5d ' \ $((actual_size*ndevs)) $actual_rsz $((crg*ndevs)) $((thr*ndevs))` echo "==============> $str" >> $workf print_summary -n "$str" @@ -89,9 +88,11 @@ for ((rsz=$rszlo;rsz<=$rszhi;rsz*=2)); do print_summary "ENOMEM" continue fi + # run tests for action in $actions; do print_summary -n "$action " echo "=====> $action" >> $workf + tmpf=${workf}_tmp # start test t0=`date +%s.%N` for ((i=0;i $tmpf ok=0 for ((i=0;i