#!/bin/bash
-PARAMS="BLUESKY_CACHE_SIZE BLUESKY_TARGET BENCH_DURATION BENCH_FILESIZE BENCH_FILECOUNT BENCH_WRITERATIO BENCH_THREADS BENCH_OPS"
+PARAMS="BLUESKY_CACHE_SIZE BLUESKY_TARGET BENCH_DURATION BENCH_FILESIZE BENCH_FILECOUNT BENCH_WRITERATIO BENCH_THREADS BENCH_OPS BENCH_INTERVALS"
BENCHER=c09-44.sysnet.ucsd.edu
PROXY=c09-45.sysnet.ucsd.edu
run_cmd() {
host="$1"; shift
cmd="$1"; shift
- echo "EXECUTE($host):" "$cmd" "$@"
+ echo "EXECUTE($host):" "$cmd" "$@" 1>&2
ssh -l root $host /scratch/bluesky.git/microbench/setup/$cmd "$@" $(get_params)
}
run_cmd $PROXY run-proxy >$PREFIX.proxy 2>&1 &
proxy_pid=$!
sleep 10
+ run_cmd $BENCHER prepare-benchmark
run_cmd $BENCHER run-benchmark | tee $PREFIX.results
run_cmd $PROXY stop-proxy
echo "Waiting for proxy to stop..."
--- /dev/null
+#!/bin/bash
+#
+# Prepare a file system for a benchmark run by creating any needed files or
+# directories.
+
+
+# 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
+BENCH_INTERVALS=4
+
+# 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 >/dev/null
+
+for t in $(seq 0 $(($BENCH_THREADS - 1))); do
+ mkdir t$t
+ for i in $(seq 0 $(($BENCH_FILECOUNT - 1))); do
+ dd if=/dev/zero of=t$t/$i bs=$BENCH_FILESIZE count=1
+ done
+done
+
+popd >/dev/null
+
+umount -f $MNTDIR
pushd $MNTDIR >/dev/null
-for t in $(seq 0 $(($BENCH_THREADS - 1))); do
- mkdir t$t
- for i in $(seq 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 \