From 1c21032927ce1b6d19f7910677ccad9cf5367159 Mon Sep 17 00:00:00 2001 From: Michael Vrable Date: Thu, 10 Mar 2011 15:25:34 -0800 Subject: [PATCH] Reorganize benchmark scripts to support running SPECsfs as well --- microbench/run-common.sh | 39 ++++++++++++++++++++++++++++++++++++ microbench/run-spec.sh | 12 +++++++++++ microbench/run2.sh | 35 ++------------------------------ microbench/setup/run-specsfs | 15 ++++++++++++++ 4 files changed, 68 insertions(+), 33 deletions(-) create mode 100644 microbench/run-common.sh create mode 100755 microbench/run-spec.sh create mode 100755 microbench/setup/run-specsfs diff --git a/microbench/run-common.sh b/microbench/run-common.sh new file mode 100644 index 0000000..792e89f --- /dev/null +++ b/microbench/run-common.sh @@ -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 index 0000000..074dd9f --- /dev/null +++ b/microbench/run-spec.sh @@ -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 & diff --git a/microbench/run2.sh b/microbench/run2.sh index aaab88f..6090129 100755 --- a/microbench/run2.sh +++ b/microbench/run2.sh @@ -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 index 0000000..9f289ce --- /dev/null +++ b/microbench/setup/run-specsfs @@ -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 -- 2.20.1