Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various improvements to the TPC-C runner #504

Merged
merged 10 commits into from
May 1, 2024
23 changes: 16 additions & 7 deletions experiments/17-chbenchmark/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,18 @@ function start_brad() {

function run_tpcc() {
pushd ../../../workloads/chbenchmark/py-tpcc/
RECORD_DETAILED_STATS=1 python3 -m pytpcc.tpcc brad \
--no-load \
--config $abs_txn_config_file \
--warehouses $txn_warehouses \
--duration $run_for_s \
--clients $t_clients \
--scalefactor $txn_scale_factor &
local args=(
--no-load
--config $abs_txn_config_file
--warehouses $txn_warehouses
--duration $run_for_s
--clients $t_clients
--scalefactor $txn_scale_factor
)
if [[ ! -z $txn_zipfian_alpha ]]; then
args+=(--zipfian-alpha $txn_zipfian_alpha)
fi
RECORD_DETAILED_STATS=1 python3 -m pytpcc.tpcc brad "${args[@]}" &
tpcc_pid=$!
popd
}
Expand Down Expand Up @@ -91,6 +96,10 @@ function extract_named_arguments() {
if [[ $phys_arg =~ --txn-config-file=.+ ]]; then
txn_config_file=${phys_arg:18}
fi

if [[ $phys_arg =~ --txn-zipfian-alpha=.+ ]]; then
txn_zipfian_alpha=${phys_arg:20}
fi
done
}

45 changes: 45 additions & 0 deletions experiments/17-chbenchmark/debug/COND
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
ZIPFIAN_ALPHA = 5.0


run_command(
name="txn_lat",
run="./run_tpcc.sh",
Expand All @@ -13,6 +16,22 @@ run_command(
},
)

run_command(
name="txn_lat_zipf",
run="./run_tpcc.sh",
options={
"physical-config-file": "../../../config/physical_config_chbench.yml",
"system-config-file": "debug_config.yml", # Relative to one level up.
"txn-config-file": "brad.config",
"schema-name": "chbenchmark",
"txn-warehouses": 1740,
"txn-scale-factor": 1, # TBD
"t-clients": 1, # TBD
"run-for-s": 180,
"txn-zipfian-alpha": ZIPFIAN_ALPHA,
},
)

run_command(
name="aurora_direct",
run="./run_aurora_direct.sh",
Expand All @@ -25,6 +44,19 @@ run_command(
},
)

run_command(
name="aurora_direct_zipf",
run="./run_aurora_direct.sh",
options={
"txn-config-file": "aurora.config",
"txn-warehouses": 1740,
"txn-scale-factor": 1, # TBD
"t-clients": 1, # TBD
"run-for-s": 180,
"txn-zipfian-alpha": ZIPFIAN_ALPHA,
},
)

run_experiment(
name="aurora_timing",
run="./run_aurora_timing.sh",
Expand All @@ -36,3 +68,16 @@ run_experiment(
"run-for-s": 30,
},
)

run_experiment(
name="aurora_timing_zipf",
run="./run_aurora_timing.sh",
options={
"txn-config-file": "aurora.config",
"txn-warehouses": 1740,
"txn-scale-factor": 1, # TBD
"t-clients": 1, # TBD
"run-for-s": 30,
"txn-zipfian-alpha": ZIPFIAN_ALPHA,
},
)
20 changes: 14 additions & 6 deletions experiments/17-chbenchmark/debug/run_aurora_direct.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,18 @@ extract_named_arguments $@
abs_txn_config_file=$(realpath $txn_config_file)

cd ../../../workloads/chbenchmark/py-tpcc/
RECORD_DETAILED_STATS=1 python3 -m pytpcc.tpcc aurora \
--no-load \
--config $abs_txn_config_file \
--warehouses $txn_warehouses \
--duration $run_for_s \
--clients $t_clients \

args=(
--no-load
--config $abs_txn_config_file
--warehouses $txn_warehouses
--duration $run_for_s
--clients $t_clients
--scalefactor $txn_scale_factor
)

if [[ ! -z $txn_zipfian_alpha ]]; then
args+=(--zipfian-alpha $txn_zipfian_alpha)
fi

RECORD_DETAILED_STATS=1 python3 -m pytpcc.tpcc aurora "${args[@]}"
20 changes: 14 additions & 6 deletions experiments/17-chbenchmark/debug/run_aurora_timing.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,18 @@ extract_named_arguments $@
abs_txn_config_file=$(realpath $txn_config_file)

cd ../../../workloads/chbenchmark/py-tpcc/
RECORD_DETAILED_STATS=1 python3 -m pytpcc.tpcc auroratiming \
--no-load \
--config $abs_txn_config_file \
--warehouses $txn_warehouses \
--duration $run_for_s \
--clients $t_clients \

args=(
--no-load
--config $abs_txn_config_file
--warehouses $txn_warehouses
--duration $run_for_s
--clients $t_clients
--scalefactor $txn_scale_factor
)

if [[ ! -z $txn_zipfian_alpha ]]; then
args+=(--zipfian-alpha $txn_zipfian_alpha)
fi

RECORD_DETAILED_STATS=1 python3 -m pytpcc.tpcc auroratiming "${args[@]}"
3 changes: 3 additions & 0 deletions tools/calibration/transactions/chbenchmark/COND
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ COND_INSTANCES = {
instance: instance.replace(".", "_").replace("db.", "") for instance in INSTANCES
}

ZIPFIAN_ALPHA = 5.0

combine(
name="all",
deps=[
Expand All @@ -36,6 +38,7 @@ for instance in INSTANCES:
"txn-warehouses": 1740,
"txn-config-file": "aurora.config",
"schema-name": "chbenchmark",
"txn-zipfian-alpha": ZIPFIAN_ALPHA,
"instance": instance,
},
)
Expand Down
7 changes: 6 additions & 1 deletion tools/calibration/transactions/chbenchmark/run_instance.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ function extract_named_arguments() {
if [[ $phys_arg =~ --instance=.+ ]]; then
instance=${phys_arg:11}
fi

if [[ $phys_arg =~ --txn-zipfian-alpha=.+ ]]; then
txn_zipfian_alpha=${phys_arg:20}
fi
done
}

Expand Down Expand Up @@ -74,7 +78,8 @@ RECORD_DETAILED_STATS=1 python3 -m pytpcc.tpcc aurora \
--duration $run_for_s \
--clients $t_clients \
--scalefactor 1 \
--lat-sample-prob 0.25
--lat-sample-prob 0.25 \
--txn-zipfian-alpha $txn_zipfian_alpha
popd

>&2 echo "Waiting 10 seconds before retrieving metrics..."
Expand Down
Loading