Update benchmark script to run a few other cases.
[bluesky.git] / microbench / run.sh
index f122370..28571ef 100755 (executable)
@@ -6,6 +6,8 @@ source "$HOME/bin/aws-keys"
 BLUESKY="$HOME/local/bluesky.git"
 NFSD="$BLUESKY/nfs3/nfsproxy"
 
+SIZES="32 64 128 256 512 512 1024 1536 2048 2560 3072 3584 4096 5120 6144 7168 8192"
+
 die() {
     echo "FATAL ERROR: $@"
     exit 1
@@ -16,7 +18,7 @@ run_setup() {
     $NFSD &
     NFSPID=$!
     sleep 0.5
-    sudo mount -t nfs -o tcp,hard,intr localhost:/bluesky /mnt/bluesky || die "Mounting NFS"
+    sudo mount -t nfs -o tcp,hard,intr,vers=3 localhost:/bluesky /mnt/bluesky || die "Mounting NFS"
 }
 
 run_cleanup() {
@@ -30,11 +32,14 @@ benchmark_setup() {
     echo "Checking for sudo access..." 1>&2
     sudo whoami
     echo "Preparing for benchmark run..." 1>&2
-    $HOME/docs/2009/fall/s3test/s3-cleanup.py mvrable-bluesky
+    s3cmd -r --force del s3://mvrable-bluesky
     run_setup
     for i in {1..64}; do
         dd if=/dev/urandom of=/mnt/bluesky/file-$i bs=32k count=1
     done
+    for s in $SIZES; do
+        dd if=/dev/urandom of=/mnt/bluesky/size-$s bs=1k count=$s
+    done
     sleep 15
     run_cleanup
 }
@@ -43,23 +48,37 @@ benchmark_cleanup() {
     echo "Cleaning up from benchmark runs..." 1>&2
 }
 
-run_test() {
+run_thread_test() {
     run_setup
     echo "Running test" 1>&2
-    (cd /mnt/bluesky; $BLUESKY/microbench/readbench "$@") >results-t$1-s$BLUESKY_OPT_SYNC_FRONTENDS
+    (cd /mnt/bluesky; $BLUESKY/microbench/statbench "$@") >results-t$1-s$BLUESKY_OPT_SYNC_FRONTENDS
+    run_cleanup
+
+    run_setup
+    echo "Running synthetic test" 1>&2
+    ($BLUESKY/nfs3/synclient "$@") >results-t$1s-s$BLUESKY_OPT_SYNC_FRONTENDS
     run_cleanup
 }
 
 benchmark_setup
 
+for s in $SIZES; do
+    run_setup
+    echo "Running read test $s" 1>&2
+    (cd /mnt/bluesky; $BLUESKY/microbench/readbench size-$s) >results-large$s-t1
+    run_cleanup
+done
+
+if false; then
 export BLUESKY_OPT_SYNC_FRONTENDS=0
 for t in 1 2 4 6 8 10 12 14 16 20 24 28 32 40 48 56 64; do
-    run_test $t
+    run_thread_test $t
 done
 
 export BLUESKY_OPT_SYNC_FRONTENDS=1
 for t in 1 2 4 6 8 10 12 14 16 20 24 28 32 40 48 56 64; do
-    run_test $t
+    run_thread_test $t
 done
+fi
 
 benchmark_cleanup