Work on automatically running benchmarks.
authorMichael Vrable <mvrable@cs.ucsd.edu>
Sun, 13 Feb 2011 20:34:00 +0000 (12:34 -0800)
committerMichael Vrable <mvrable@cs.ucsd.edu>
Sun, 13 Feb 2011 20:34:00 +0000 (12:34 -0800)
microbench/run2.sh [new file with mode: 0755]
microbench/setup/run-benchmark

diff --git a/microbench/run2.sh b/microbench/run2.sh
new file mode 100755 (executable)
index 0000000..3bcc2e5
--- /dev/null
@@ -0,0 +1,42 @@
+#!/bin/bash
+
+PARAMS="BLUESKY_CACHE_SIZE BLUESKY_TARGET BENCH_DURATION BENCH_FILESIZE BENCH_FILECOUNT BENCH_WRITERATIO BENCH_THREADS BENCH_OPS"
+
+BENCHER=c09-44.sysnet.ucsd.edu
+PROXY=c09-45.sysnet.ucsd.edu
+
+get_params() {
+    for p in $PARAMS; do
+        if [ -n "${!p}" ]; then
+            echo "$p=${!p}"
+        fi
+    done
+}
+
+run_cmd() {
+    host="$1"; shift
+    cmd="$1"; shift
+    echo "EXECUTE($host):" "$cmd" "$@"
+    ssh -l root $host /scratch/bluesky.git/microbench/setup/$cmd "$@" $(get_params)
+}
+
+for size in 512; do
+    BENCH_DURATION=20
+    BENCH_WRITERATIO=0.0
+    BLUESKY_TARGET=s3
+    BLUESKY_CACHE_SIZE=$(($size * 1024))
+
+    PREFIX=$BLUESKY_TARGET-$BENCH_WRITERATIO
+
+    echo "SETTINGS:" $(get_params)
+    get_params >$PREFIX.settings
+
+    run_cmd $PROXY cleanup-proxy
+    run_cmd $PROXY run-proxy >$PREFIX.proxy 2>&1 &
+    proxy_pid=$!
+    sleep 10
+    run_cmd $BENCHER run-benchmark | tee $PREFIX.results
+    run_cmd $PROXY stop-proxy
+    echo "Waiting for proxy to stop..."
+    wait $proxy_pid
+done
index 73cb99e..bf0bc9e 100755 (executable)
@@ -26,7 +26,7 @@ done
 # Prepare to run the benchmark
 mount -t nfs -o vers=3,tcp,rw,soft,intr $SERVER:/export $MNTDIR
 
-pushd $MNTDIR
+pushd $MNTDIR >/dev/null
 
 for t in $(seq 0 $(($BENCH_THREADS - 1))); do
     mkdir t$t
@@ -43,6 +43,6 @@ done
     $BENCH_DURATION \
     $BENCH_OPS
 
-popd
+popd >/dev/null
 
 umount -f $MNTDIR