From ac2eed840b76d95fbc5751a6e6b0bcff06115c5f Mon Sep 17 00:00:00 2001 From: adilger Date: Sun, 8 Sep 2002 08:24:57 +0000 Subject: [PATCH] Like runregression-net.sh, but only bulk I/O, and lots of it. It does reads immediately following the write tests, to catch errors early. Uses 64GB of space on a real OST. --- lustre/tests/runregression-brw.sh | 102 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 lustre/tests/runregression-brw.sh diff --git a/lustre/tests/runregression-brw.sh b/lustre/tests/runregression-brw.sh new file mode 100644 index 0000000..7535864 --- /dev/null +++ b/lustre/tests/runregression-brw.sh @@ -0,0 +1,102 @@ +#!/bin/sh +export PATH=/sbin:/usr/sbin:$PATH + +SRCDIR="`dirname $0`/" +. $SRCDIR/common.sh + +runthreads() { + THR=$1 + DO=$2 + CNT=$3 + V=$4 + PGS=$5 + + case $DO in + test_getattr) + RW= + ;; + test_brw_write) + DO=test_brw + RW=w + ;; + + test_brw_read) + DO=test_brw + RW=r + ;; + esac + + if [ -e endrun ]; then + rm endrun + echo "exiting because endrun file was found" + exit 0 + fi + + $OBDCTL --threads $THR v '$OSCDEV' $DO $CNT $RW $V $PGS $OID || exit 1 +} + +if [ -z "`$OBDCTL device_list | grep osc`" ]; then + setup_opts $@ + + setup_portals + setup_lustre + + setup_server || exit -1 + setup_client || exit -1 +fi + +OID=`$OBDCTL --device '$OSCDEV' create 1 | awk '/is object id/ { print $6 }'` +[ -z "$OID" ] && echo "error creating object" 1>&2 && exit 1 + +# TODO: obdctl needs to check on the progress of each forked thread +# (IPC SHM, sockets?) to see if it hangs. +while date; do + PG=1 + PGV=16 + # We use '--threads 1 X' instead of '--device X' so that + # obdctl can monitor the forked thread for progress (TODO). + debug_server_off + debug_client_off + runthreads 1 test_brw_write 10000000 -30 $PG + runthreads 1 test_brw_read 10000000 -30 $PG + + [ "$PGV" ] && runthreads 1 test_brw_write 1000000 -30 $PGV + [ "$PGV" ] && runthreads 1 test_brw_read 1000000 -30 $PGV + + runthreads 2 test_brw_write 10000000 -30 $PG + runthreads 2 test_brw_read 10000000 -30 $PG + + [ "$PGV" ] && runthreads 2 test_brw_write 1000000 -30 $PGV + [ "$PGV" ] && runthreads 2 test_brw_read 1000000 -30 $PGV + + runthreads 10 test_brw_write 1000000 -30 $PG + runthreads 10 test_brw_read 1000000 -30 $PG + + [ "$PGV" ] && runthreads 10 test_brw_write 100000 -60 $PGV + [ "$PGV" ] && runthreads 10 test_brw_read 100000 -60 $PGV + + runthreads 32 test_brw_write 1000000 -30 $PG + runthreads 32 test_brw_read 1000000 -30 $PG + + [ "$PGV" ] && runthreads 32 test_brw_write 100000 -60 $PGV + [ "$PGV" ] && runthreads 32 test_brw_read 100000 -60 $PGV + + runthreads 64 test_brw_write 1000000 -30 $PG + runthreads 64 test_brw_read 1000000 -30 $PG + + [ "$PGV" ] && runthreads 64 test_brw_write 100000 -60 $PGV + [ "$PGV" ] && runthreads 64 test_brw_read 100000 -60 $PGV + + runthreads 100 test_brw_write 100000 -60 $PG + runthreads 100 test_brw_read 100000 -60 $PG + + [ "$PGV" ] && runthreads 100 test_brw_write 100000 -60 $PGV + [ "$PGV" ] && runthreads 100 test_brw_read 100000 -60 $PGV +done + +$OBDCTL --device '$OSCDEV' destroy $OID + +cleanup_client || exit -1 +cleanup_server || exit -1 +cleanup_lustre +cleanup_portals -- 1.8.3.1