Reorganize benchmark scripts to support running SPECsfs as well
authorMichael Vrable <mvrable@cs.ucsd.edu>
Thu, 10 Mar 2011 23:25:34 +0000 (15:25 -0800)
committerMichael Vrable <mvrable@cs.ucsd.edu>
Thu, 10 Mar 2011 23:25:34 +0000 (15:25 -0800)
microbench/run-common.sh [new file with mode: 0644]
microbench/run-spec.sh [new file with mode: 0755]
microbench/run2.sh
microbench/setup/run-specsfs [new file with mode: 0755]

diff --git a/microbench/run-common.sh b/microbench/run-common.sh
new file mode 100644 (file)
index 0000000..792e89f
--- /dev/null
@@ -0,0 +1,39 @@
+# Common definitions and functions for the various run-* scripts.
+
+. $HOME/bin/aws-keys
+
+SCRIPT_PATH=/scratch/bluesky.git/microbench/setup
+
+PARAMS="BLUESKY_RUN_NAME BLUESKY_CACHE_SIZE BLUESKY_TARGET BENCH_DURATION BENCH_FILESIZE BENCH_FILECOUNT BENCH_WRITERATIO BENCH_THREADS BENCH_OPS BENCH_INTERVALS BENCH_DIRSIZE BENCH_BLOCKSIZE NFS_BLOCKSIZE SPEC_CONF"
+
+BLUESKY_RUN_NAME=$(date +%Y%m%d)-$$
+BENCHER=vrable1.sysnet.ucsd.edu
+PROXY=vrable2.sysnet.ucsd.edu
+
+SSH_ARGS="-i $HOME/.ssh/id_bluesky"
+
+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" "$@" 1>&2
+    ssh $SSH_ARGS -l root $host $SCRIPT_PATH/$cmd "$@" $(get_params)
+}
+
+BLUESKY_CACHE_SIZE=$((8 * 1024 * 1024))
+BENCH_FILESIZE=$((1024 * 1024))
+BENCH_BLOCKSIZE=0
+BENCH_FILECOUNT=$((62))
+BENCH_WRITERATIO=0.5
+BENCH_THREADS=4
+BENCH_DURATION=120
+BENCH_INTERVALS=10
+BENCH_DIRSIZE=128
+NFS_BLOCKSIZE=1048576
diff --git a/microbench/run-spec.sh b/microbench/run-spec.sh
new file mode 100755 (executable)
index 0000000..074dd9f
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+BASEDIR=$(dirname $(which $0))
+. $BASEDIR/run-common.sh
+
+run_spec() {
+    BLUESKY_RUN_NAME=$(date +%Y%m%d)-$1
+
+    $HOME/bin/s3-cleanup.py mvrable-bluesky
+    $HOME/bin/s3-cleanup.py mvrable-bluesky-west
+    run_cmd $PROXY cleanup-proxy
+    run_cmd $PROXY run-proxy >$BLUESKY_RUN_NAME.proxy 2>&1 &
index aaab88f..6090129 100755 (executable)
@@ -1,38 +1,7 @@
 #!/bin/bash
 
-PARAMS="BLUESKY_RUN_NAME BLUESKY_CACHE_SIZE BLUESKY_TARGET BENCH_DURATION BENCH_FILESIZE BENCH_FILECOUNT BENCH_WRITERATIO BENCH_THREADS BENCH_OPS BENCH_INTERVALS BENCH_DIRSIZE BENCH_BLOCKSIZE NFS_BLOCKSIZE"
-
-BLUESKY_RUN_NAME=$(date +%Y%m%d)-$$
-BENCHER=c09-44.sysnet.ucsd.edu
-PROXY=c09-45.sysnet.ucsd.edu
-
-SSH_ARGS="-i $HOME/.ssh/id_bluesky"
-
-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" "$@" 1>&2
-    ssh $SSH_ARGS -l root $host /scratch/bluesky.git/microbench/setup/$cmd "$@" $(get_params)
-}
-
-BLUESKY_CACHE_SIZE=$((8 * 1024 * 1024))
-BENCH_FILESIZE=$((1024 * 1024))
-BENCH_BLOCKSIZE=0
-BENCH_FILECOUNT=$((62))
-BENCH_WRITERATIO=0.5
-BENCH_THREADS=4
-BENCH_DURATION=120
-BENCH_INTERVALS=10
-BENCH_DIRSIZE=128
-NFS_BLOCKSIZE=1048576
+BASEDIR=$(dirname $(which $0))
+. $BASEDIR/run-common.sh
 
 sizes="128 512 1024 2048 8192"
 ops_list="2000 1000 500 200 100 50 20 10"
diff --git a/microbench/setup/run-specsfs b/microbench/setup/run-specsfs
new file mode 100755 (executable)
index 0000000..9f289ce
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/bash
+#
+# Launch SPECsfs; should be run on the load-generator node.
+
+# 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
+
+cd /scratch/spec-sfs/manager
+java SfsManager -r $SPEC_CONF -s $BLUESKY_RUN_NAME