Server rename for benchmarks
[bluesky.git] / microbench / run2.sh
1 #!/bin/bash
2
3 BASEDIR=$(dirname $(which $0))
4 . $BASEDIR/run-common.sh
5
6 BLUESKY_CACHE_SIZE=$((1024 * 1024))
7
8 sizes="128 512 1024 2048 8192"
9 ops_list="1000 500 200 100 50 20 10"
10
11 run_one() {
12     PREFIX=$1
13
14     $HOME/bin/s3-cleanup.py mvrable-bluesky
15     $HOME/bin/s3-cleanup.py mvrable-bluesky-west
16     run_cmd $PROXY cleanup-proxy
17     run_cmd $PROXY run-proxy >$PREFIX.proxy 2>&1 &
18     proxy_pid=$!
19     sleep 10
20     run_cmd $BENCHER prepare-benchmark
21
22     for BENCH_OPS in $ops_list; do
23         sleep 10
24         echo "SETTINGS:" $(get_params)
25         get_params >$PREFIX-$BENCH_OPS.settings
26         (date; run_cmd $BENCHER run-benchmark) | tee $PREFIX-$BENCH_OPS.results
27     done
28
29     run_cmd $PROXY stop-proxy
30     echo "Waiting for proxy to stop..."
31     wait $proxy_pid
32 }
33
34 run_experiments() {
35 for size in $sizes; do
36     BENCH_FILECOUNT=$(($size * 1024 / ($BENCH_FILESIZE / 1024)))
37
38     BENCH_BLOCKSIZE=32768
39     NFS_BLOCKSIZE=32768
40     run_one s3-$BENCH_WRITERATIO-${size}M-32k
41
42     BENCH_BLOCKSIZE=0
43     NFS_BLOCKSIZE=1048576
44     run_one s3-$BENCH_WRITERATIO-${size}M-1024k
45 done
46 }
47
48 BLUESKY_TARGET=s3:mvrable-bluesky-west
49 BENCH_THREADS=4
50
51 for BENCH_WRITERATIO in 0.0 1.0 0.5; do
52     run_experiments
53 done