--- /dev/null
+#!/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
# 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
$BENCH_DURATION \
$BENCH_OPS
-popd
+popd >/dev/null
umount -f $MNTDIR