-
Notifications
You must be signed in to change notification settings - Fork 3
/
threshold_sweep.sh
executable file
·81 lines (69 loc) · 2.67 KB
/
threshold_sweep.sh
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#!/bin/bash
trace_file="trace_mat-mult_t3_s4.json"
workload_name=`echo $trace_file | cut -d_ -f2`
db_delay=0.001
dtc=0.00000001
n=5
w=4
#min_t1l_range=0.5
#max_t1l_range=5
#t1l_step=0.5
#min_t1h_range=0
#max_t1h_range=6
#t1h_step=0.5
#min_t2_range=0
#max_t2_range=3
#t2_step=1
min_t1l_range=0
max_t1l_range=11
t1l_step=0.5
min_t1h_range=1
max_t1h_range=12
t1h_step=0.5
min_t2_range=0
max_t2_range=3
t2_step=1
#min_t1l_range=0
#max_t1l_range=0.1
#t1l_step=0.1
#min_t1h_range=0
#max_t1h_range=0.1
#t1h_step=0.1
#min_t2_range=1000
#max_t2_range=1100
#t2_step=100
threshold_sweep_output_file="threshold_sweep.csv"
if [ -f $threshold_sweep_out_file ] ; then
rm $threshold_sweep_output_file
fi
#csv title
echo "workload,total_num_tasks,total_task_durations,total_num_objects,total_object_sizes,norm_critical_path,num_nodes,worker_per_node,data_transfer_cost,scheduler,t1l,t1h,t2total job completion" | paste -sd ',' >> $threshold_sweep_output_file
##############################rnn########################################
for t2 in `seq $min_t2_range $t2_step $max_t2_range`
do
for t1h in `seq $min_t1h_range $t1h_step $max_t1h_range`
do
for t1l in `seq $min_t1l_range $t1l_step $max_t1l_range`
do
if (( `echo "$t1l<=$t1h" | bc`==1 )) ; then
export RAY_SCHED_THRESHOLD1L=$t1l
export RAY_SCHED_THRESHOLD1H=$t1h
export RAY_SCHED_THRESHOLD2=$t2
echo $RAY_SCHED_THRESHOLD1L
echo $RAY_SCHED_THRESHOLD1H
echo $RAY_SCHED_THRESHOLD2
dot="$(cd "$(dirname "$0")"; pwd)"
echo running ray-scheduler-prototype on $workload_name trace with basic_threshold scheduling policy, 5 nodes, 4 workers per node, $dtc data transfer cost, and $db_delay db delay
sim_result=`python replaytrace.py $n $w $dtc $db_delay trivial_threshold_local false $dot/traces/sweep/$trace_file 2>&1 | tail -n1`
echo $sim_result
sim_time_result=`echo $sim_result | cut -d: -f1`
total_tasks_num=`echo $sim_result | cut -d: -f2`
total_task_durations=`echo $sim_result | cut -d: -f3`
total_num_objects=`echo $sim_result | cut -d: -f4`
total_object_sizes=`echo $sim_result | cut -d: -f5`
norm_critical_path=`echo $sim_result | cut -d: -f6`
echo $workload_name, $total_tasks_num, $total_task_durations, $total_num_objects, $total_object_sizes, $norm_critical_path, $n, $w, $dtc, basic_threshold, $t1l, $t1h, $t2, $sim_time_result | paste -sd ',' >> $threshold_sweep_output_file
fi
done
done
done