#!/bin/bash
function bail () { echo -e "Error: ${1:-Unknown Error}\n"; exit ${2:-1}; }
instance=${1:-Unset}
[[ $instance == "Unset" ]] && bail "Specify instance as parameter"
[[ ! -d /p4/$instance/logs ]] && bail "Instance $instance not found: /p4/$instance/logs"
P4BENCH_SCRIPT=${2:-Unset}
[[ $P4BENCH_SCRIPT == "Unset" ]] && bail "Specify P4BENCH_SCRIPT as second parameter"
[[ ! -f locust_files/p4_$P4BENCH_SCRIPT.py ]] && bail "Benchmark script $P4BENCH_SCRIPT not found: locust_files/p4_$P4BENCH_SCRIPT.py"
# Remove existing logs to make sure they don't clutter up the measurements
sudo rm /p4/$instance/logs/log
# Remove shared logs on other servers if appropriate
#sudo rm /remote/p4/rep/h02_$instance/logs/log
#sudo rm /remote/p4/rep/h03_$instance/logs/log
#sudo rm /remote/p4/rep/h04_$instance/logs/log
config_file="config_p4_${P4BENCH_SCRIPT}.yml"
sed -e "s/:1666/:${instance}666/" < locust_files/$config_file > $config_file
rm logs/*slave*.out
ansible-playbook -i hosts ansible/copy_logs.yml
ansible-playbook -i hosts ansible/rm_logs.yml
ansible-playbook -i hosts ansible/post_bench.yml
ansible-playbook -i hosts ansible/pre_bench.yml
./run_master.sh
ansible-playbook -i hosts ansible/bench.yml
# ansible-playbook -i hosts ansible/replicas.yml
bash run_monitor.sh
| # | Change | User | Description | Committed | |
|---|---|---|---|---|---|
| #13 | 25529 | Robert Cowham |
Latest copy of files including docker compose setup. Merging //guest/robert_cowham/p4benchmark/pb/... to //guest/robert_cowham/p4benchmark/main/... |
||
| #12 | 24851 | Robert Cowham |
Improve sql reporting. Log ps usage |
||
| #11 | 24848 | Robert Cowham |
Drop caches per run. Increase num slaves to 70 |
||
| #10 | 24758 | Robert Cowham | Tweak repeat count | ||
| #9 | 24747 | Robert Cowham | Full parameterised - runs syncbench at least | ||
| #8 | 24745 | Robert Cowham | Use global vars in hosts file | ||
| #7 | 24735 | Robert Cowham | Fix running of sync | ||
| #6 | 24711 | Robert Cowham | Restructure and tidy up | ||
| #5 | 24687 | Robert Cowham | Got analysis working | ||
| #4 | 22003 | Robert Cowham | Latest state - with p4python and no syncing | ||
| #3 | 21902 | Robert Cowham | New run for mupltiple edges | ||
| #2 | 21897 | Robert Cowham | Handle edge servers too | ||
| #1 | 21767 | Robert Cowham | add latest stuff with analyse |