3 # Run a set of benchmarks on the NFS frontend and report performance.
5 source "$HOME/bin/aws-keys"
6 BLUESKY="$HOME/local/bluesky.git"
7 NFSD="$BLUESKY/nfs3/nfsproxy"
9 SIZES="32 64 128 256 512 512 1024 1536 2048 2560 3072 3584 4096 5120 6144 7168 8192"
12 echo "FATAL ERROR: $@"
17 echo "Starting nfsproxy..." 1>&2
21 sudo mount -t nfs -o tcp,hard,intr,vers=3 localhost:/bluesky /mnt/bluesky || die "Mounting NFS"
25 echo "Stopping nfsproxy..." 1>&2
26 sudo umount -f /mnt/bluesky
32 echo "Checking for sudo access..." 1>&2
34 echo "Preparing for benchmark run..." 1>&2
35 s3cmd -r --force del s3://mvrable-bluesky
38 dd if=/dev/urandom of=/mnt/bluesky/file-$i bs=32k count=1
41 dd if=/dev/urandom of=/mnt/bluesky/size-$s bs=1k count=$s
48 echo "Cleaning up from benchmark runs..." 1>&2
53 echo "Running test" 1>&2
54 (cd /mnt/bluesky; $BLUESKY/microbench/statbench "$@") >results-t$1-s$BLUESKY_OPT_SYNC_FRONTENDS
58 echo "Running synthetic test" 1>&2
59 ($BLUESKY/nfs3/synclient "$@") >results-t$1s-s$BLUESKY_OPT_SYNC_FRONTENDS
67 echo "Running read test $s" 1>&2
68 (cd /mnt/bluesky; $BLUESKY/microbench/readbench size-$s) >results-large$s-t1
73 export BLUESKY_OPT_SYNC_FRONTENDS=0
74 for t in 1 2 4 6 8 10 12 14 16 20 24 28 32 40 48 56 64; do
78 export BLUESKY_OPT_SYNC_FRONTENDS=1
79 for t in 1 2 4 6 8 10 12 14 16 20 24 28 32 40 48 56 64; do