X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Ftests%2Fscrub-performance.sh;h=26ec345200b71c6e4ba61d1a85d7c944322beeb9;hp=814a9195512952a86b90044cc116cbc81e724bb0;hb=8ddf4e2aa863e3100a3dff916821f2739e9427cd;hpb=1e8ff9e1309b0dd777db872195bad033b73d638b diff --git a/lustre/tests/scrub-performance.sh b/lustre/tests/scrub-performance.sh index 814a919..26ec345 100644 --- a/lustre/tests/scrub-performance.sh +++ b/lustre/tests/scrub-performance.sh @@ -13,12 +13,16 @@ init_test_env $@ . ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh} init_logging -[ "${MDSFSTYPE:-$FSTYPE}" != "ldiskfs" ] && +[ $(facet_fstype $SINGLEMDS) != ldiskfs ] && skip "OI scrub performance only for ldiskfs" && exit 0 +[[ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.2.90) ]] && + skip "Need MDS version at least 2.2.90" && exit 0 require_dsh_mds || exit 0 +[ "$SLOW" = "no" ] && skip "skip scrub performance test under non-SLOW mode" + NTHREADS=${NTHREADS:-0} -UNIT=${UNIT:-0} +UNIT=${UNIT:-1048576} BACKUP=${BACKUP:-0} MINCOUNT=${MINCOUNT:-8192} MAXCOUNT=${MAXCOUNT:-32768} @@ -33,14 +37,14 @@ remote_mds && ECHOCMD=${RCMD} || ECHOCMD="eval" if [ ${NTHREADS} -eq 0 ]; then CPUCORE=$(${RCMD} cat /proc/cpuinfo | grep "processor.*:" | wc -l) - NTHREADS=$((CPUCORE * 3)) + NTHREADS=$((CPUCORE * 2)) fi stopall do_rpc_nodes $(facet_active_host $SINGLEMDS) load_modules_local reformat_external_journal -add $SINGLEMDS $(mkfs_opts $SINGLEMDS) --backfstype ldiskfs --reformat \ - $MDT_DEVNAME > /dev/null || exit 2 +add ${SINGLEMDS} $(mkfs_opts ${SINGLEMDS} ${MDT_DEVNAME}) --backfstype ldiskfs \ + --reformat ${MDT_DEVNAME} $(mdsvdevname 1) > /dev/null || exit 2 scrub_attach() { ${ECHOCMD} "${LCTL} <<-EOF @@ -139,7 +143,8 @@ test_0() { if [ ${BACKUP} -ne 0 ]; then stime=$(date +%s) echo "backup/restore ${i} files start at: $(date)" - mds_backup_restore || error "Fail to backup/restore!" + mds_backup_restore $SINGLEMDS || + error "Fail to backup/restore!" echo "backup/restore ${i} files end at: $(date)" etime=$(date +%s) delta=$((etime - stime)) @@ -147,7 +152,8 @@ test_0() { echo "backup/restore ${i} files used ${delta} seconds" echo "backup/restore speed is $((i / delta))/sec" else - mds_remove_ois || error "Fail to remove/recreate!" + mds_remove_ois $SINGLEMDS || + error "Fail to remove/recreate!" fi echo "--- start to rebuild OI for $i files set at: $(date) ---" @@ -173,5 +179,5 @@ run_test 0 "OI scrub performance test" # cleanup the system at last scrub_cleanup -complete $(basename $0) $SECONDS +complete $SECONDS exit_status