Skip to content

Commit

Permalink
Adjust demo scenario scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
geoffxy committed Mar 30, 2024
1 parent 169cf64 commit 7b8c25f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 20 deletions.
5 changes: 5 additions & 0 deletions experiments/16-demo/run_scale_down_workload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ script_loc=$(cd $(dirname $0) && pwd -P)
cd $script_loc
source common.sh

if [ -z $1 ]; then
>&2 echo "Usage: $0 path/to/physical/config/file.yml"
exit 1
fi

./scale_down_workload_impl.sh \
--physical-config-file=$1 \
--system-config-file=scale_down_config.yml \
Expand Down
26 changes: 6 additions & 20 deletions experiments/16-demo/scale_down_workload_impl.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
#! /bin/bash

if [ -z $1 ]; then
>&2 echo "Usage: $0 path/to/physical/config.yml"
exit 1
fi

script_loc=$(cd $(dirname $0) && pwd -P)
cd $script_loc
source common.sh
Expand All @@ -15,7 +10,7 @@ start_brad_w_ui $system_config_file $physical_config_file
>&2 echo "Waiting for BRAD to start up..."
sleep 30

num_clients=12
num_clients=24
starting_clients=4
COND_OUT=out python3 ../../workloads/IMDB_extended/run_transactions_variable_clients.py \
--num-clients $num_clients \
Expand All @@ -29,9 +24,10 @@ qidx="99,56,32,92,91,49,30,83,94,87,86,76,37,31,46"
qbank_file="../../workloads/IMDB_100GB/regular_test/queries.sql"
ra_gap_s=15
ra_gap_std_s=5
starting_ra_clients=8
COND_OUT=out python3 ../../workloads/IMDB_extended/run_variable_clients.py \
--num-clients $num_clients \
--starting-clients $starting_clients \
--starting-clients $starting_ra_clients \
--num-front-ends $num_clients \
--query-indexes $qidx \
--query-bank-file $qbank_file \
Expand All @@ -41,17 +37,7 @@ COND_OUT=out python3 ../../workloads/IMDB_extended/run_variable_clients.py \
rana_pid=$!
>&2 echo "Started RA runner (PID $rana_pid)"

function inner_cancel_experiment() {
cancel_experiment $txn_pid $rana_pid

wait $txn_pid
wait $rana_pid
wait $brad_pid
}

trap "inner_cancel_experiment" INT
trap "inner_cancel_experiment" TERM
# Wait for Ctrl-C.
read -r -d '' _ </dev/tty

wait $txn_pid
wait $rana_pid
wait $brad_pid
graceful_shutdown $txn_pid $rana_pid

0 comments on commit 7b8c25f

Please sign in to comment.