Whamcloud - gitweb
LU-15853 tests: sanity 104c should use $MOUNT
[fs/lustre-release.git] / lustre / tests / dom-performance.sh
index 501a30f..db28ae5 100644 (file)
@@ -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"
@@ -210,6 +202,9 @@ run_IOR() {
                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=""
@@ -222,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 \