From: fsgqa Date: Sat, 9 Nov 2002 05:49:41 +0000 (+0000) Subject: Small updates to dbench test runs, and integrate some bonnie++ runs too. X-Git-Tag: v1.1.0~1036 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d56adf280eb2b1b6981a7539ef5b3c713b532768;p=xfstests-dev.git Small updates to dbench test runs, and integrate some bonnie++ runs too. Add a header showing mount and mkfs options. --- diff --git a/bench b/bench index cd7bc37d..532e2023 100755 --- a/bench +++ b/bench @@ -134,6 +134,8 @@ _run_benchmark() _merge_results() { echo Results for $bench benchmark >>$OUT + headers=`$here/run.$bench -h` + echo "[$headers]" >>$OUT echo results.$bench.* | sort -nu | xargs cat >>$OUT echo >>$OUT } @@ -157,6 +159,12 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 _require_scratch +cat >$OUT <<-EOF + MKFS_OPTIONS=$MKFS_OPTIONS + MOUNT_OPTIONS=$MOUNT_OPTIONS + +EOF + rm -f bench.* for bench in $benches do diff --git a/common.bonnie b/common.bonnie new file mode 100644 index 00000000..c730e5ef --- /dev/null +++ b/common.bonnie @@ -0,0 +1,18 @@ +##/bin/sh + +run_bonnie() +{ + # dir, no hostname, quiet, fast (no per-char), ram (no sz checks) + tmp=/var/tmp + + mkdir ./bonnie || exit 1 + defaults="-d ./bonnie -q -f -r 0" + bonnie++ -m '' $defaults $@ >$tmp/bonnie.stdout 2>$tmp/bonnie.stderr + status=$? + rm -fr ./bonnie + [ $status -ne 0 ] && exit 1 + filter_stdout < $tmp/bonnie.stdout + filter_stderr < $tmp/bonnie.stderr + rm -f $tmp/bonnie.stdout $tmp/bonnie.stderr + exit 0 +} diff --git a/run.bonnie_io b/run.bonnie_io new file mode 100755 index 00000000..573faef7 --- /dev/null +++ b/run.bonnie_io @@ -0,0 +1,38 @@ +#!/bin/sh +# +# Does a bonnie throughput run (80M file and 1K chunksize if the +# BONNIE_FILESIZE and/or BONNIE_CHUNKSIZE variables are not set), +# then massages the output into CSV format with the human-readable +# output preceding it as a "comment" (ie. #-prefixed). +# +BONNIE_FILESIZE=${BONNIE_FILESIZE:=80M} +BONNIE_CHUNKSIZE=${BONNIE_CHUNKSIZE:=1K} + +. $here/common.bonnie + +# +# Sample bonnie throughput output (stderr): +#Version 1.02c ------Sequential Output------ --Sequential Input- --Random- +# -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks-- +#Machine Size:chnk K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec %CP +# 150M:64k 52024 99 88969 99 245492 100 3746 264 +# +filter_stderr() +{ + sed -e 's/^..................../# /g' | awk '{print} END {print "#"}' +} + +# +# Sample bonnie throughput output (stdout): +# ",150M:64k,,,52024,99,88969,99,,,245492,100,3746.0,264,,,,,,,,,,,,," +# +filter_stdout() +{ + tr -s ',' | sed -e 's/^,//' -e 's/,$//' +} + +if [ $# -gt 0 ]; then + echo "size:chnk,writeK/s,wcpu,rewriteK/s,rwcpu,readK/s,rcpu,seek/s,scpu" + exit 0 +fi +run_bonnie -n 0 -s $BONNIE_FILESIZE:$BONNIE_CHUNKSIZE diff --git a/run.bonnie_ops b/run.bonnie_ops new file mode 100755 index 00000000..d059d2ab --- /dev/null +++ b/run.bonnie_ops @@ -0,0 +1,56 @@ +#!/bin/sh +# +# Do a bonnie++ create/read/delete run using 8192 files (unless +# BONNIE_KFILES environment variable is set -- note this number +# is multiplied by 1024 by bonnie++). By default the files are +# created in the same directory, BONNIE_NDIRS specifies a count +# of subdirs to evenly spread files through. Regular files are +# created by default (BONNIE_FILETYPE=regular), alternatively +# the values "symlinks" and "hardlinks" can be used. +# +# The script then massages the output into CSV format with the +# human-readable output preceding it as a "comment" (#-prefixed). +# +BONNIE_NDIRS=${BONNIE_NDIRS:=1} +BONNIE_KFILES=${BONNIE_KFILES:=8} +BONNIE_FILETYPE=${BONNIE_FILETYPE:=regular} + +. $here/common.bonnie + +# +# Sample bonnie throughput output (stderr): +#Version 1.02c ------Sequential Create------ --------Random Create-------- +# -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete-- +# files /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP +# 4 525 27 +++++ +++ 517 26 526 25 +++++ +++ 230 12 +# [ Note: the "files" can also be "^files:max" and possibly other things ] +filter_stderr() +{ + sed -e 's/^..................../# /g' | awk '{ print } END { print "# }' +} + +# +# Sample bonnie IOPs output (stdout): +# ",,,,,,,,,,,,,,4,525,27,+++++,+++,517,26,526,25,+++++,+++,230,12" +# [ nathans note: always get +++ due to 0:0 for min:max file sizes. ] +# [ I will need to fix the filter if I ever start using file sizes. ] +# +filter_stdout() +{ + tr -d '+' | tr -d \' | tr -s ',' | sed -e 's/^,//' -e 's/,$//' +} + +if [ $# -gt 0 ]; then + echo Kfiles/dirs,seqCR/s,CPU,seqRM/s,CPU,rndmCR/s,CPU,rndmRM/s,CPU + exit 0 +fi + +case "$BONNIE_FILETYPE" +in + regular) BONNIE_FILETYPE=0 ;; + symlink) BONNIE_FILETYPE=-2 ;; + hardlink) BONNIE_FILETYPE=-1 ;; + *) echo "BONNIE_FILETYPE has an unrecognised value" && exit 1 ;; +esac + +run_bonnie -s 0 -n $BONNIE_KFILES:$BONNIE_FILETYPE:0:$BONNIE_NDIRS diff --git a/run.dbench b/run.dbench index 2ded1f29..78be9c92 100755 --- a/run.dbench +++ b/run.dbench @@ -5,4 +5,6 @@ DBENCH_CLIENTS=1 export DBENCH_CLIENTS -exec $here/common.dbench +[ ! -d "$here" ] && here=`pwd` + +exec $here/common.dbench $@ diff --git a/run.dbench10 b/run.dbench10 index 5694fe3d..cd615b16 100755 --- a/run.dbench10 +++ b/run.dbench10 @@ -5,4 +5,6 @@ DBENCH_CLIENTS=10 export DBENCH_CLIENTS -exec $here/common.dbench +[ ! -d "$here" ] && here=`pwd` + +exec $here/common.dbench $@ diff --git a/run.dbench100 b/run.dbench100 index a69aa3c6..b3dcf29d 100755 --- a/run.dbench100 +++ b/run.dbench100 @@ -5,4 +5,6 @@ DBENCH_CLIENTS=100 export DBENCH_CLIENTS -exec $here/common.dbench +[ ! -d "$here" ] && here=`pwd` + +exec $here/common.dbench $@ diff --git a/run.dbench50 b/run.dbench50 index c410436e..323414b8 100755 --- a/run.dbench50 +++ b/run.dbench50 @@ -5,4 +5,6 @@ DBENCH_CLIENTS=50 export DBENCH_CLIENTS -exec $here/common.dbench +[ ! -d "$here" ] && here=`pwd` + +exec $here/common.dbench $@ diff --git a/run.tar b/run.tar index 39c6c18d..b6f455b8 100755 --- a/run.tar +++ b/run.tar @@ -33,7 +33,7 @@ run_tar() } if [ $# -gt 0 ]; then - echo "size,user,system,elapsed" + echo "sz,usr,sys,real" exit 0 fi new_tar