Add a header showing mount and mkfs options.
_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
}
_require_scratch
+cat >$OUT <<-EOF
+ MKFS_OPTIONS=$MKFS_OPTIONS
+ MOUNT_OPTIONS=$MOUNT_OPTIONS
+
+EOF
+
rm -f bench.*
for bench in $benches
do
--- /dev/null
+##/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
+}
--- /dev/null
+#!/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
--- /dev/null
+#!/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
DBENCH_CLIENTS=1
export DBENCH_CLIENTS
-exec $here/common.dbench
+[ ! -d "$here" ] && here=`pwd`
+
+exec $here/common.dbench $@
DBENCH_CLIENTS=10
export DBENCH_CLIENTS
-exec $here/common.dbench
+[ ! -d "$here" ] && here=`pwd`
+
+exec $here/common.dbench $@
DBENCH_CLIENTS=100
export DBENCH_CLIENTS
-exec $here/common.dbench
+[ ! -d "$here" ] && here=`pwd`
+
+exec $here/common.dbench $@
DBENCH_CLIENTS=50
export DBENCH_CLIENTS
-exec $here/common.dbench
+[ ! -d "$here" ] && here=`pwd`
+
+exec $here/common.dbench $@
}
if [ $# -gt 0 ]; then
- echo "size,user,system,elapsed"
+ echo "sz,usr,sys,real"
exit 0
fi
new_tar