From 29986b1ec0f82485eb848259e57b1c96c3b2a02f Mon Sep 17 00:00:00 2001 From: Michael Vrable Date: Sun, 13 Feb 2011 12:34:00 -0800 Subject: [PATCH] Work on automatically running benchmarks. --- microbench/run2.sh | 42 ++++++++++++++++++++++++++++++++++ microbench/setup/run-benchmark | 4 ++-- 2 files changed, 44 insertions(+), 2 deletions(-) create mode 100755 microbench/run2.sh diff --git a/microbench/run2.sh b/microbench/run2.sh new file mode 100755 index 0000000..3bcc2e5 --- /dev/null +++ b/microbench/run2.sh @@ -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 diff --git a/microbench/setup/run-benchmark b/microbench/setup/run-benchmark index 73cb99e..bf0bc9e 100755 --- a/microbench/setup/run-benchmark +++ b/microbench/setup/run-benchmark @@ -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 -- 2.20.1