Update to a warning message to provide more debugging info
[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     BLUESKY_RUN_NAME=$PREFIX
15     $HOME/bin/s3-cleanup.py mvrable-bluesky
16     $HOME/bin/s3-cleanup.py mvrable-bluesky-west
17     run_cmd $PROXY cleanup-proxy
18     run_cmd $PROXY run-proxy >$PREFIX.proxy 2>&1 &
19     proxy_pid=$!
20     sleep 10
21     run_cmd $BENCHER prepare-benchmark
22
23     for BENCH_OPS in $ops_list; do
24         sleep 10
25         BLUESKY_RUN_NAME=$PREFIX-$BENCH_OPS
26         echo "SETTINGS:" $(get_params)
27         get_params >$BLUESKY_RUN_NAME.settings
28         (date; run_cmd $BENCHER run-benchmark) | tee $BLUESKY_RUN_NAME.results
29     done
30
31     run_cmd $PROXY stop-proxy
32     echo "Waiting for proxy to stop..."
33     wait $proxy_pid
34 }
35
36 run_experiments() {
37 for size in $sizes; do
38     BENCH_FILECOUNT=$(($size * 1024 / ($BENCH_FILESIZE / 1024)))
39
40     BENCH_BLOCKSIZE=32768
41     NFS_BLOCKSIZE=32768
42     run_one s3-$BENCH_WRITERATIO-${size}M-32k
43
44     BENCH_BLOCKSIZE=0
45     NFS_BLOCKSIZE=1048576
46     run_one s3-$BENCH_WRITERATIO-${size}M-1024k
47 done
48 }
49
50 BLUESKY_TARGET=s3:mvrable-bluesky-west
51 BENCH_THREADS=4
52
53 for BENCH_WRITERATIO in 0.0 1.0 0.5; do
54     run_experiments
55 done