b247b5b40bd4c6586c6f81c21c51a236c71ec745
[bluesky.git] / microbench / run-synread.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 sizes="1048576 131072 32768"
10
11 run_synbench() {
12     basename=$(date +%Y%m%d)-$1
13     BLUESKY_RUN_NAME=$basename
14
15     run_cmd $PROXY cleanup-proxy
16     run_cmd $PROXY run-proxy >$BLUESKY_RUN_NAME.proxy 2>&1 &
17     proxy_pid=$!
18     sleep 10
19
20     SYNREAD_SIZE=$((1 << 24))
21     run_cmd $BENCHER warmup-synread
22     for s in $sizes; do
23         SYNREAD_SIZE=$s
24
25         SYNREAD_OUTSTANDING=1
26         SYNREAD_PROCS=1
27         BLUESKY_RUN_NAME=$basename-$(($s / 1024))-c1
28         run_cmd $BENCHER run-synread
29
30         #SYNREAD_OUTSTANDING=8
31         #SYNREAD_PROCS=2
32         #BLUESKY_RUN_NAME=$basename-$(($s / 1024))-c16
33         #run_cmd $BENCHER run-synread
34     done
35
36     run_cmd $PROXY stop-proxy
37     echo "Waiting for proxy to stop..."
38     wait $proxy_pid
39 }
40
41 SYNREAD_DURATION=120
42 for cache in 0 4 8 12 16 20 24 28 32; do
43     BLUESKY_CACHE_SIZE=$(($cache * 1024 * 1024))
44     if [ $cache -eq 0 ]; then
45         BLUESKY_CACHE_SIZE=$((64 * 1024))
46     fi
47     run_synbench "syntest-${cache}G"
48 done