X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Ftests%2Fdom-performance.sh;h=db28ae52472992858bc72c9f4d10e9d9cf438cef;hb=11a93cea735e1ae9ae36588f27d15fd828ffef76;hp=98d454c91d157bdbcbf87877e350a2675c2c73ae;hpb=b6443b3799622f3e281b087f6cf0c86432887846;p=fs%2Flustre-release.git diff --git a/lustre/tests/dom-performance.sh b/lustre/tests/dom-performance.sh index 98d454c..db28ae5 100644 --- a/lustre/tests/dom-performance.sh +++ b/lustre/tests/dom-performance.sh @@ -7,31 +7,23 @@ set -e ONLY=${ONLY:-"$*"} -ALWAYS_EXCEPT=${ALWAYS_EXCEPT:-"$DOM_PERFORMANCE_EXCEPT"} -# UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT! - -[ "$SLOW" = "no" ] && EXCEPT_SLOW="" - -LUSTRE=${LUSTRE:-$(cd $(dirname $0)/..; echo $PWD)} +LUSTRE=${LUSTRE:-$(dirname $0)/..} . $LUSTRE/tests/test-framework.sh - init_test_env $@ -. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh} init_logging +ALWAYS_EXCEPT="$DOM_PERFORMANCE_EXCEPT" +build_test_filter + SAVED_FAIL_ON_ERROR=$FAIL_ON_ERROR FAIL_ON_ERROR=false SAVED_DEBUG=$($LCTL get_param -n debug 2> /dev/null) - . $LUSTRE/tests/functions.sh -build_test_filter check_and_setup_lustre -# if MACHINEFILE set and exists -- use it -MACHINEFILE=${MACHINEFILE:-$TMP/$(basename $0 .sh)-$(hostname).machines} clients=${CLIENTS:-$HOSTNAME} generate_machine_file $clients $MACHINEFILE || error "Failed to generate machine file" @@ -41,13 +33,17 @@ DP_DIO=${DP_DIO:-"no"} DOM_SIZE=${DOM_SIZE:-"1M"} DP_OSC="mdc" -rm -rf $DIR/* - DP_NORM=$DIR/dp_norm DP_DOM=$DIR/dp_dom DP_DOM_DNE=$DIR/dp_dne DP_STATS=${DP_STATS:-"no"} +if $DO_CLEANUP; then + rm -rf $DIR/* +else + rm -rf $DP_NORM $DP_DOM $DP_DOM_DNE +fi + # total number of files DP_FNUM=${DP_FNUM:-16384} # number of threads @@ -140,8 +136,7 @@ dp_run_cmd() { run_MDtest() { if ! which mdtest > /dev/null 2>&1 ; then - echo "Mdtest is not installed, skipping" - return 0 + skip_env "Mdtest is not installed, skipping" fi local mdtest=$(which mdtest) @@ -167,38 +162,26 @@ run_MDtest() { } run_SmallIO() { - if [ ! -f createmany ] ; then - echo "Createmany is not installed, skipping" - return 0 - fi - - if [ ! -f smalliomany ] ; then - echo "Smalliomany is not installed, skipping" - return 0 - fi - local TDIR=${1:-$DIR} local count=$DP_FNUM local MIN=$((count * 16)) - [ $MDSSIZE -le $MIN ] && count=$((MDSSIZE / 16)) + local mdssize=$(mdssize_from_index $TDIR 0) + [ $mdssize -le $MIN ] && count=$((mdssize / 16)) - dp_run_cmd "./createmany -o $TDIR/file- $count | grep 'total:'" + dp_run_cmd "createmany -o $TDIR/file- $count | grep 'total:'" if [ ${PIPESTATUS[0]} != 0 ]; then error "File creation failed, aborting" fi - if [ -f statmany ]; then - dp_run_cmd "./statmany -s $TDIR/file- $count $((count * 5)) | - grep 'total:'" - if [ ${PIPESTATUS[0]} != 0 ]; then - error "File stat failed, aborting" - fi - + dp_run_cmd "statmany -s $TDIR/file- $count $((count * 5)) | + grep 'total:'" + if [ ${PIPESTATUS[0]} != 0 ]; then + error "File stat failed, aborting" fi for opc in w a r ; do - dp_run_cmd "./smalliomany -${opc} $TDIR/file- $count 300 | + dp_run_cmd "smalliomany -${opc} $TDIR/file- $count 300 | grep 'total:'" if [ ${PIPESTATUS[0]} != 0 ]; then error "SmallIO -${opc} failed, aborting" @@ -206,7 +189,7 @@ run_SmallIO() { done - dp_run_cmd "./unlinkmany $TDIR/file- $count | grep 'total:'" + dp_run_cmd "unlinkmany $TDIR/file- $count | grep 'total:'" if [ ${PIPESTATUS[0]} != 0 ]; then error "SmallIO failed, aborting" fi @@ -216,10 +199,12 @@ run_SmallIO() { run_IOR() { if ! which IOR > /dev/null 2>&1 ; then - echo "IOR is not installed, skipping" - return 0 + skip_env "IOR is not installed, skipping" fi + # Requires at least 20GB (roughly) + (( MDSSIZE >= 20000000 )) || skip "Require MDS of at least 20GB" + local IOR=$(which IOR) local iter=$((DP_FNUM / DP_NUM)) local direct="" @@ -232,11 +217,19 @@ run_IOR() { chmod 0777 $TDIR - local bsizes="8" - [ "$SLOW" = "yes" ] && bsizes="4 32" + # for DoM large files (beyond the DoM size) use + # DOM_SIZE=1M : + # bsize="4096 " - 4Mb + # nsegments=$((128 * 1024)) + # DOM_SIZE=64k : + # bsize="1024 " - 1Mb + # nsegments=$((32 * 1024)) + local bsizes=${BSIZES:-"4 32"} + local nsegments=${NSEGMENTS:-128} + [ "$SLOW" = "no" ] && bsizes="8" for bsize in $bsizes ; do - segments=$((128 / bsize)) + segments=$((nsegments / bsize)) dp_run_cmd "mpi_run -np $DP_NUM $IOR \ -a POSIX -b ${bsize}K -t ${bsize}K -o $TDIR/ -k \ @@ -262,8 +255,7 @@ run_IOR() { run_Dbench() { if ! which dbench > /dev/null 2>&1 ; then - echo "Dbench is not installed, skipping" - return 0 + skip_env "Dbench is not installed, skipping" fi local TDIR=${1:-$MOUNT} @@ -285,8 +277,7 @@ run_Dbench() { run_FIO() { # https://github.com/axboe/fio/archive/fio-2.8.zip if ! which fio > /dev/null 2>&1 ; then - echo "No FIO installed, skipping" - return 0 + skip_env "No FIO installed, skipping" fi local fnum=128 # per thread @@ -357,14 +348,22 @@ run_FIO() { } run_compbench() { - if ! which compilebench > /dev/null 2>&1 ; then - echo "Compilebench is not installed, skipping" - return 0 + local compilebench + if [ x$cbench_DIR = x ]; then + compilebench=$(which compilebench 2> /dev/null) + else + cd $cbench_DIR + [ -x compilebench ] || + skip_env "compilebench is missing in $cbench_DIR" + compilebench=compilebench fi + [ x$compilebench != x ] || + skip_env "Compilebench is not installed, skipping" + local TDIR=${1:-$MOUNT} - dp_run_cmd "compilebench -D $TDIR -i 2 -r 2 --makej" + dp_run_cmd "$compilebench -D $TDIR -i 2 -r 2 --makej" if [ ${PIPESTATUS[0]} != 0 ]; then error "Compilebench failed, aborting" fi