Small updates to dbench test runs, and integrate some bonnie++ runs too.

Add a header showing mount and mkfs options.
This commit is contained in:
fsgqa
2002-11-09 05:49:41 +00:00
parent 3a4a860cbc
commit d56adf280e
9 changed files with 133 additions and 5 deletions
+8
View File
@@ -134,6 +134,8 @@ _run_benchmark()
_merge_results() _merge_results()
{ {
echo Results for $bench benchmark >>$OUT echo Results for $bench benchmark >>$OUT
headers=`$here/run.$bench -h`
echo "[$headers]" >>$OUT
echo results.$bench.* | sort -nu | xargs cat >>$OUT echo results.$bench.* | sort -nu | xargs cat >>$OUT
echo >>$OUT echo >>$OUT
} }
@@ -157,6 +159,12 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
_require_scratch _require_scratch
cat >$OUT <<-EOF
MKFS_OPTIONS=$MKFS_OPTIONS
MOUNT_OPTIONS=$MOUNT_OPTIONS
EOF
rm -f bench.* rm -f bench.*
for bench in $benches for bench in $benches
do do
+18
View File
@@ -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
}
Executable
+38
View File
@@ -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
Executable
+56
View File
@@ -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
+3 -1
View File
@@ -5,4 +5,6 @@
DBENCH_CLIENTS=1 DBENCH_CLIENTS=1
export DBENCH_CLIENTS export DBENCH_CLIENTS
exec $here/common.dbench [ ! -d "$here" ] && here=`pwd`
exec $here/common.dbench $@
+3 -1
View File
@@ -5,4 +5,6 @@
DBENCH_CLIENTS=10 DBENCH_CLIENTS=10
export DBENCH_CLIENTS export DBENCH_CLIENTS
exec $here/common.dbench [ ! -d "$here" ] && here=`pwd`
exec $here/common.dbench $@
+3 -1
View File
@@ -5,4 +5,6 @@
DBENCH_CLIENTS=100 DBENCH_CLIENTS=100
export DBENCH_CLIENTS export DBENCH_CLIENTS
exec $here/common.dbench [ ! -d "$here" ] && here=`pwd`
exec $here/common.dbench $@
+3 -1
View File
@@ -5,4 +5,6 @@
DBENCH_CLIENTS=50 DBENCH_CLIENTS=50
export DBENCH_CLIENTS export DBENCH_CLIENTS
exec $here/common.dbench [ ! -d "$here" ] && here=`pwd`
exec $here/common.dbench $@
+1 -1
View File
@@ -33,7 +33,7 @@ run_tar()
} }
if [ $# -gt 0 ]; then if [ $# -gt 0 ]; then
echo "size,user,system,elapsed" echo "sz,usr,sys,real"
exit 0 exit 0
fi fi
new_tar new_tar