Skip to content
Snippets Groups Projects
Commit d67b22ce authored by Elena Gryaznova's avatar Elena Gryaznova
Browse files

b=16218

i=Adilger
fix directio part; reduce multithread filesize
parent 88726660
No related branches found
No related tags found
No related merge requests found
...@@ -170,7 +170,7 @@ for NAME in $CONFIGS; do ...@@ -170,7 +170,7 @@ for NAME in $CONFIGS; do
SPACE=$(( OSTCOUNT * MIN )) SPACE=$(( OSTCOUNT * MIN ))
[ $SPACE -lt $SIZE ] && SIZE=$((SPACE * 3 / 4)) [ $SPACE -lt $SIZE ] && SIZE=$((SPACE * 3 / 4))
log "min OST has ${MIN}kB available, using ${SIZE}kB file size" log "min OST has ${MIN}kB available, using ${SIZE}kB file size"
IOZONE_OPTS="-i 0 -i 1 -i 2 -e -+d -r $RSIZE -s $SIZE" IOZONE_OPTS="-i 0 -i 1 -i 2 -e -+d -r $RSIZE"
IOZFILE="$IOZDIR/iozone" IOZFILE="$IOZDIR/iozone"
IOZLOG=$TMP/iozone.log IOZLOG=$TMP/iozone.log
# $SPACE was calculated with all OSTs # $SPACE was calculated with all OSTs
...@@ -179,7 +179,7 @@ for NAME in $CONFIGS; do ...@@ -179,7 +179,7 @@ for NAME in $CONFIGS; do
myRUNAS=$RUNAS myRUNAS=$RUNAS
FAIL_ON_ERROR=false check_runas_id_ret $myUID $myRUNAS || { myRUNAS="" && myUID=$UID; } FAIL_ON_ERROR=false check_runas_id_ret $myUID $myRUNAS || { myRUNAS="" && myUID=$UID; }
chown $myUID:$myUID $IOZDIR chown $myUID:$myUID $IOZDIR
$myRUNAS iozone $IOZONE_OPTS -f $IOZFILE 2>&1 | tee $IOZLOG $myRUNAS iozone $IOZONE_OPTS -s $SIZE -f $IOZFILE 2>&1 | tee $IOZLOG
tail -1 $IOZLOG | grep -q complete || \ tail -1 $IOZLOG | grep -q complete || \
{ error "iozone (1) failed" && false; } { error "iozone (1) failed" && false; }
rm -f $IOZLOG rm -f $IOZLOG
...@@ -191,14 +191,14 @@ for NAME in $CONFIGS; do ...@@ -191,14 +191,14 @@ for NAME in $CONFIGS; do
if [ -z "$O_DIRECT" ]; then if [ -z "$O_DIRECT" ]; then
touch $MOUNT/f.iozone touch $MOUNT/f.iozone
if ! ./directio write $MOUNT/f.iozone 0 1; then if ! ./directio write $MOUNT/f.iozone 0 1; then
log "SKIP iozone DIRECT IO test"
O_DIRECT=no O_DIRECT=no
fi fi
rm -f $MOUNT/f.iozone rm -f $MOUNT/f.iozone
fi fi
if [ "$O_DIRECT" != "no" -a "$IOZONE_DIR" != "no" ]; then if [ "$O_DIRECT" != "no" -a "$IOZONE_DIR" != "no" ]; then
$DEBUG_OFF $DEBUG_OFF
# cd TMP to have write permission for tmp file iozone writes $myRUNAS iozone -I $IOZONE_OPTS -s $SIZE -f $IOZFILE.odir 2>&1 | tee $IOZLOG
( cd $TMP && $myRUNAS iozone -I $IOZONE_OPTS $IOZFILE.odir 2>&1 | tee $IOZLOG)
tail -1 $IOZLOG | grep -q complete || \ tail -1 $IOZLOG | grep -q complete || \
{ error "iozone (2) failed" && false; } { error "iozone (2) failed" && false; }
rm -f $IOZLOG rm -f $IOZLOG
...@@ -215,12 +215,12 @@ for NAME in $CONFIGS; do ...@@ -215,12 +215,12 @@ for NAME in $CONFIGS; do
$LFS setstripe -c -1 $IOZDIR $LFS setstripe -c -1 $IOZDIR
$DEBUG_OFF $DEBUG_OFF
THREAD=1 THREAD=1
IOZFILE="-F " IOZFILE=" "
while [ $THREAD -le $IOZ_THREADS ]; do while [ $THREAD -le $IOZ_THREADS ]; do
IOZFILE="$IOZFILE $IOZDIR/iozone.$THREAD" IOZFILE="$IOZFILE $IOZDIR/iozone.$THREAD"
THREAD=$((THREAD + 1)) THREAD=$((THREAD + 1))
done done
$myRUNAS iozone $IOZONE_OPTS -t $IOZ_THREADS $IOZFILE 2>&1 | tee $IOZLOG $myRUNAS iozone $IOZONE_OPTS -s $((SIZE / IOZ_THREADS)) -t $IOZ_THREADS -F $IOZFILE 2>&1 | tee $IOZLOG
tail -1 $IOZLOG | grep -q complete || \ tail -1 $IOZLOG | grep -q complete || \
{ error "iozone (3) failed" && false; } { error "iozone (3) failed" && false; }
rm -f $IOZLOG rm -f $IOZLOG
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment