From: Michael Vrable Date: Wed, 9 Feb 2011 23:26:54 +0000 (-0800) Subject: Add script to run a simple microbenchmark. X-Git-Url: http://git.vrable.net/?p=bluesky.git;a=commitdiff_plain;h=30cb3aacb8d70657d27af5956a482f0f653a457c Add script to run a simple microbenchmark. --- diff --git a/microbench/setup/run-benchmark b/microbench/setup/run-benchmark new file mode 100755 index 0000000..4b590e3 --- /dev/null +++ b/microbench/setup/run-benchmark @@ -0,0 +1,48 @@ +#!/bin/bash +# +# Start up the NFS server. + + +# Defaults +SERVER=c09-45.sysnet.ucsd.edu +MNTDIR=/mnt/bluesky + +BENCH_FILESIZE=$((1 << 12)) +BENCH_FILECOUNT=$((8)) +BENCH_WRITERATIO=1.0 +BENCH_THREADS=8 +BENCH_DURATION=120 +BENCH_OPS=100 + +# Export any environment variables specified on the command line +for e in "$@"; do + echo "$e" 1>&2 + if echo "$e" | grep = >/dev/null; then + eval "$e" + export ${e%=*} + fi +done + +# Prepare to run the benchmark +mount -t nfs -o vers=3,tcp,rw,soft,intr $SERVER:/export $MNTDIR + +pushd $MNTDIR + +for t in $(seq 0 $(($BENCH_THREADS - 1))); do + mkdir t$t + for i in {0..$(($BENCH_FILECOUNT - 1))}; do + dd if=/dev/zero of=t$t/$i bs=$BENCH_FILESIZE count=1 + done +done + +/scratch/bluesky.git/microbench/mixedbench \ + $BENCH_FILESIZE \ + $BENCH_FILECOUNT \ + $BENCH_WRITERATIO \ + $BENCH_THREADS \ + $BENCH_DURATION \ + $BENCH_OPS + +popd + +umount -f $MNTDIR