-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_all.sh
More file actions
executable file
·53 lines (44 loc) · 1.46 KB
/
run_all.sh
File metadata and controls
executable file
·53 lines (44 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$SCRIPT_DIR"
VIOMMU_MODES=("off" "nested" "nested-vFree")
# VIOMMU_MODES=("nested-vFree")
# --- Experiment configurations ---
# (num_vms, num_total_cores, num_active_cores, num_flows)
# num_flows = num_active_cores per VM
CONFIGS=(
"2 16 16 16"
"4 8 8 8"
"8 4 4 4"
)
run_idx=0
total=$((${#CONFIGS[@]} * ${#VIOMMU_MODES[@]}))
for config in "${CONFIGS[@]}"; do
read -r num_vms num_total_cores num_active_cores num_flows <<< "$config"
for viommu in "${VIOMMU_MODES[@]}"; do
run_idx=$((run_idx + 1))
echo ""
echo "================================================================"
echo " Run ${run_idx}/${total}: --viommu ${viommu} --num-vms ${num_vms}" \
"--num-total-cores ${num_total_cores} --num-active-cores ${num_active_cores}" \
"--num-flows ${num_flows}"
echo "================================================================"
echo ""
./run_vms.sh \
--viommu "$viommu" \
--num-vms "$num_vms" \
--num-total-cores "$num_total_cores" \
--num-active-cores "$num_active_cores" \
--num-flows "$num_flows" \
--skip-reset-host
rc=$?
if [[ $rc -ne 0 ]]; then
echo "WARNING: Run ${run_idx} failed (exit $rc), continuing..."
fi
done
done
echo ""
echo "================================================================"
echo " All ${total} experiments complete"
echo "================================================================"