More benchmark fixes
[bluesky.git] / microbench / run-synwrite.sh
1 #!/bin/bash
2
3 BASEDIR=$(dirname $(which $0))
4 . $BASEDIR/run-common.sh
5
6 BLUESKY_TARGET=s3:mvrable-readbench-west
7 BLUESKY_EXTRA_OPTS="BLUESKY_OPT_NO_CRYPTO=1"
8
9 rates="1 2 4 8 16 32 48 100000"
10
11 run_synbench() {
12     basename=$(date +%Y%m%d)-$1
13     BLUESKY_RUN_NAME=$basename
14
15     $HOME/bin/s3-cleanup.py mvrable-bluesky-west
16     run_cmd $PROXY cleanup-proxy
17     run_cmd $PROXY run-proxy >$BLUESKY_RUN_NAME.proxy 2>&1 &
18     proxy_pid=$!
19     sleep 10
20
21     for SYNWRITE_RATE in $rates; do
22         run_cmd $BENCHER run-synwrite
23         sleep 60
24     done
25
26     run_cmd $PROXY stop-proxy
27     echo "Waiting for proxy to stop..."
28     wait $proxy_pid
29 }
30
31 for BLUESKY_CACHE_SIZE in $((512 * 1024)); do
32     run_synbench "write100-$(($BLUESKY_CACHE_SIZE / 1024))M"
33 done