-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Break scale up workload into two parts
- Loading branch information
Showing
4 changed files
with
254 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
experiments/15-e2e-scenarios-v2/scale_up/run_overall_warmup.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#! /bin/bash | ||
script_loc=$(cd $(dirname $0) && pwd -P) | ||
cd $script_loc | ||
source ../common.sh | ||
|
||
initial_queries="99,56,32,92,91,49,30,83,94,38,87,86,76,37,31,46" | ||
heavier_queries="58,61,62,64,69,73,74,51,57,60" | ||
|
||
# Arguments: | ||
# --config-file | ||
# --planner-config-file | ||
# --query-indexes | ||
extract_named_arguments $@ | ||
|
||
function inner_cancel_experiment() { | ||
cancel_experiment $rana_pid $txn_pid | ||
} | ||
|
||
trap "inner_cancel_experiment" INT | ||
trap "inner_cancel_experiment" TERM | ||
|
||
# Used just to warm up the systems. | ||
|
||
export BRAD_IGNORE_BLUEPRINT=1 | ||
start_brad_debug $config_file $planner_config_file | ||
sleep 30 | ||
|
||
start_repeating_olap_runner 1 5 5 $initial_queries "ra_8" | ||
rana_pid=$runner_pid | ||
sleep 2 | ||
|
||
log_workload_point "start_txn_2" | ||
start_txn_runner 2 | ||
txn_pid=$runner_pid | ||
|
||
sleep $((5 * 60)) | ||
graceful_shutdown $rana_pid $txn_pid |
90 changes: 90 additions & 0 deletions
90
experiments/15-e2e-scenarios-v2/scale_up/run_workload_ana_up.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
#! /bin/bash | ||
|
||
script_loc=$(cd $(dirname $0) && pwd -P) | ||
cd $script_loc | ||
source ../common.sh | ||
|
||
initial_queries="99,56,32,92,91,49,30,83,94,38,87,86,76,37,31,46" | ||
heavier_queries="58,61,62,64,69,73,74,51,57,60" | ||
|
||
# Arguments: | ||
# --config-file | ||
# --planner-config-file | ||
# --query-indexes | ||
extract_named_arguments $@ | ||
|
||
function txn_sweep() { | ||
local sweep=$1 | ||
local gap_minute=$2 | ||
local keep_last=$3 | ||
|
||
for t_clients in $sweep; do | ||
start_txn_runner $t_clients # Implicit: --dataset-type | ||
txn_pid=$runner_pid | ||
|
||
sleep $(($gap_minute * 60)) | ||
if [[ -z $keep_last ]] || [[ $t_clients != $keep_last ]]; then | ||
kill -INT $txn_pid | ||
wait $txn_pid | ||
fi | ||
done | ||
} | ||
|
||
function rana_sweep_offset4() { | ||
local sweep=$1 | ||
local gap_minute=$2 | ||
local keep_last=$3 | ||
local query_indices=$4 | ||
|
||
for ra_clients in $sweep; do | ||
start_repeating_olap_runner $ra_clients 15 5 $query_indices "ra_${ra_clients}" 4 | ||
sweep_rana_pid=$runner_pid | ||
|
||
sleep $(($gap_minute * 60)) | ||
if [[ -z $keep_last ]] || [[ $ra_clients != $keep_last ]]; then | ||
kill -INT $sweep_rana_pid | ||
wait $sweep_rana_pid | ||
fi | ||
done | ||
} | ||
|
||
function inner_cancel_experiment() { | ||
if [ ! -z $heavy_rana_pid ]; then | ||
cancel_experiment $rana_pid $txn_pid $heavy_rana_pid | ||
else | ||
cancel_experiment $rana_pid $txn_pid | ||
fi | ||
} | ||
|
||
trap "inner_cancel_experiment" INT | ||
trap "inner_cancel_experiment" TERM | ||
|
||
start_brad $config_file $planner_config_file | ||
log_workload_point "brad_start_initiated" | ||
sleep 30 | ||
|
||
# Start with 4 light analytical clients. | ||
log_workload_point "start_rana_4" | ||
start_repeating_olap_runner 4 15 5 $initial_queries "ra_4" | ||
rana_pid=$runner_pid | ||
log_workload_point "started_rana_4_$rana_pid" | ||
sleep 2 | ||
|
||
# Start with 8 transactional clients; hold for 10 minutes to stabilize. | ||
log_workload_point "start_txn_4" | ||
start_txn_runner 4 | ||
txn_pid=$runner_pid | ||
sleep $((10 * 60)) | ||
|
||
# Scale up to 28 analytical clients in total (24 heavy). | ||
log_workload_point "start_increase_rana_heavy_4_to_24" | ||
rana_sweep_offset4 "4 8 12 16 20 24" 3 24 $heavier_queries | ||
log_workload_point "hold_rana_heavy_24" | ||
sleep $((30 * 60)) # 18 + 30 mins; 58 cumulative | ||
|
||
log_workload_point "experiment_workload_done" | ||
|
||
# Shut down everything now. | ||
>&2 echo "Experiment done. Shutting down runners..." | ||
graceful_shutdown $rana_pid $heavy_rana_pid $txn_pid | ||
log_workload_point "shutdown_complete" |
85 changes: 85 additions & 0 deletions
85
experiments/15-e2e-scenarios-v2/scale_up/run_workload_txn_up.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
#! /bin/bash | ||
|
||
script_loc=$(cd $(dirname $0) && pwd -P) | ||
cd $script_loc | ||
source ../common.sh | ||
|
||
# Scenario: | ||
# - Start from 2x t4g.medium Aurora, Redshift off | ||
# - 4 T clients, increasing to 24 T clients by 4 every minute | ||
# We expect BRAD to scale up Aurora at this point, but not start Redshift (a replica should be fine for the analytical workload) | ||
# - Increase the analytical load + add new "heavier" queries - expect that these go to Athena | ||
# - Increase frequency of queries, expect Redshift to start (go straight to 2x dc2.large to avoid classic resize for practical purposes) | ||
|
||
# TODO: This executor file should be adapted to run against the baselines too | ||
# (TiDB / Serverless Redshift + Aurora) | ||
|
||
initial_queries="99,56,32,92,91,49,30,83,94,38,87,86,76,37,31,46" | ||
heavier_queries="58,61,62,64,69,73,74,51,57,60" | ||
|
||
# Arguments: | ||
# --config-file | ||
# --planner-config-file | ||
# --query-indexes | ||
extract_named_arguments $@ | ||
|
||
function txn_sweep() { | ||
local sweep=$1 | ||
local gap_minute=$2 | ||
local keep_last=$3 | ||
|
||
for t_clients in $sweep; do | ||
start_txn_runner $t_clients # Implicit: --dataset-type | ||
txn_pid=$runner_pid | ||
|
||
sleep $(($gap_minute * 60)) | ||
if [[ -z $keep_last ]] || [[ $t_clients != $keep_last ]]; then | ||
kill -INT $txn_pid | ||
wait $txn_pid | ||
fi | ||
done | ||
} | ||
|
||
function inner_cancel_experiment() { | ||
if [ ! -z $heavy_rana_pid ]; then | ||
cancel_experiment $rana_pid $txn_pid $heavy_rana_pid | ||
else | ||
cancel_experiment $rana_pid $txn_pid | ||
fi | ||
} | ||
|
||
trap "inner_cancel_experiment" INT | ||
trap "inner_cancel_experiment" TERM | ||
|
||
start_brad $config_file $planner_config_file | ||
log_workload_point "brad_start_initiated" | ||
sleep 30 | ||
|
||
# Start with Aurora 2x db.t4g.medium, Redshift off, Athena unused. | ||
|
||
# Start with 4 analytical clients. | ||
log_workload_point "start_rana_4" | ||
start_repeating_olap_runner 4 15 5 $initial_queries "ra_4" | ||
rana_pid=$runner_pid | ||
log_workload_point "started_rana_4_$rana_pid" | ||
sleep 2 | ||
|
||
# Start with 4 transactional clients; hold for 15 minutes to stabilize. | ||
log_workload_point "start_txn_4" | ||
start_txn_runner 4 | ||
txn_pid=$runner_pid | ||
sleep $((10 * 60)) # 10 mins; 10 mins cumulative | ||
|
||
# Scale up to 8 transactional clients and hold for 30 minutes. | ||
log_workload_point "start_increase_txn_4_to_8" | ||
kill -INT $txn_pid | ||
wait $txn_pid | ||
txn_sweep "5 6 7 8" 3 8 | ||
log_workload_point "hold_txn_8_20_min" | ||
sleep $((35 * 60)) # 47 mins total; 57 mins cumulative | ||
|
||
# Shut down everything now. | ||
log_workload_point "experiment_workload_done" | ||
>&2 echo "Experiment done. Shutting down runners..." | ||
graceful_shutdown $rana_pid $heavy_rana_pid $txn_pid | ||
log_workload_point "shutdown_complete" |