@@ -14,25 +14,67 @@ so_version = "Ubuntu 18.04 LTS"
14
14
kernel_version = " 4.15.0-29-generic"
15
15
16
16
[execution ]
17
+ # Execution procedure:
18
+ # 1) execution.exports
19
+ # 2) execution.killall
20
+ # 3) execution.setup
21
+ # 4) for each runset in execution subsections:
22
+ # for each run in runset subsections:
23
+ # runset.export
24
+ # run.export
25
+ # run.start
26
+ # runset.start
27
+ # execution.load
28
+ # execution.fetch_results
29
+ # execution.cleanup
30
+ #
31
+ # exports: export commands which should be used to export common environment variables.
17
32
exports = ' export outdir="stateless"'
33
+ # killall: kill all processes started by the experiment.
18
34
killall = ' for ip in $ip1 $ip2 $ip3 $ip4; do ssh -i ${sshkey} ubuntu@${ip} "kill -9 \$(lsof -i tcp:3000 -t) 2>/dev/null; kill -9 \$(lsof -i tcp:8000 -t) 2>/dev/null"; done'
35
+ # setup: setup the environment (VMs/servers), guaranteeing that everything need to start the experiment is there. For example, copy files and sync repositories.
19
36
setup = ' cd $GOPATH/src/github.com/gcinterceptor/msgpush-go && go build && for ip in $ip1 $ip2 $ip3 $ip4; do scp -i ${sshkey} msgpush-go ubuntu@${ip}:~/; done; cd $GOPATH/src/github.com/gcinterceptor/gci-proxy && go build && for ip in $ip1 $ip2 $ip3 $ip4; do scp -i ${sshkey} gci-proxy ubuntu@${ip}:~/; done'
37
+ # load: trigger the load.
20
38
load = ' ssh -i ${sshkey} ubuntu@${lb} "sudo rm /var/log/nginx/access.log; sudo /etc/init.d/nginx restart; echo \"GET http://localhost/\" | ./vegeta attack -duration=60s -rate=80 >/dev/null; sudo rm /var/log/nginx/access.log; sudo /etc/init.d/nginx restart; echo \"GET http://localhost/\" | ./vegeta attack -duration=120s -rate=80 > results.bin; cat results.bin | ./vegeta report > vegeta_${expid}.out; cat results.bin | ./vegeta report -reporter=plot > plot_${expid}.html; rm results.bin; cp /var/log/nginx/access.log al_${expid}.csv"'
39
+ # fetch_results: fetches experiment results.
21
40
fetch_results = ' scp -i ${sshkey} ubuntu@${lb}:~/*_${expid}* ${outdir}; for ip in $ip1 $ip2 $ip3 $ip4; do scp -i ${sshkey} ubuntu@${ip}:~/*_${expid}_${ip}* ${outdir}; done'
41
+ # cleanup: killall processes, removes files and revert configuration changes done by the experiment run.
22
42
cleanup = ' ssh -i ${sshkey} ubuntu@${lb} "rm *${expid}*"; for ip in $ip1 $ip2 $ip3 $ip4; do ssh -i ${sshkey} ubuntu@${ip} "kill -9 \$(lsof -i tcp:3000 -t) 2>/dev/null; kill -9 \$(lsof -i tcp:8000 -t) 2>/dev/null; rm *${expid}_${ip}*"; done'
23
43
24
44
[execution .no_gci ]
45
+ # start: start all processes needed by the experiment run
25
46
start = ' for ip in $ip1 $ip2 $ip3 $ip4; do ssh -i ${sshkey} ubuntu@${ip} "kill -9 \$(lsof -i tcp:3000 -t) 2>/dev/null; kill -9 \$(lsof -i tcp:8000 -t) 2>/dev/null; GODEBUG=gctrace=1 USE_GCI=false MSG_SIZE=10240 WINDOW_SIZE=1 PORT=3000 nohup ./msgpush-go >msgpush_${expid}_${ip}.out 2>msgpush_${expid}_${ip}.err &"; done'
26
- exports_1 = ' export expid="nogci_go_1"'
27
- exports_2 = ' export expid="nogci_go_2"'
28
- exports_3 = ' export expid="nogci_go_3"'
29
- exports_4 = ' export expid="nogci_go_4"'
30
- exports_5 = ' export expid="nogci_go_5"'
47
+
48
+ [execution .no_gci .1 ]
49
+ # exports: export commands which should be used to export common environment variables.
50
+ exports = ' export expid="nogci_go_1"'
51
+
52
+ [execution .no_gci .2 ]
53
+ exports = ' export expid="nogci_go_2"'
54
+
55
+ [execution .no_gci .3 ]
56
+ exports = ' export expid="nogci_go_3"'
57
+
58
+ [execution .no_gci .4 ]
59
+ exports = ' export expid="nogci_go_4"'
60
+
61
+ [execution .no_gci .5 ]
62
+ exports = ' export expid="nogci_go_5"'
31
63
32
64
[execution .gci ]
33
65
start = ' for ip in $ip1 $ip2 $ip3 $ip4; do ssh -i ${sshkey} ubuntu@${ip} "kill -9 \$(lsof -i tcp:3000 -t) 2>/dev/null; kill -9 \$(lsof -i tcp:8000 -t) 2>/dev/null; nohup ./gci-proxy --port 3000 --url http://127.0.0.1:8000 --ygen=67108864 --tgen=67108864 >proxy_${expid}_${ip}.out 2>proxy_${expid}_${ip}.err& GODEBUG=gctrace=1 USE_GCI=true MSG_SIZE=10240 WINDOW_SIZE=1 PORT=8000 nohup ./msgpush-go >msgpush_${expid}_${ip}.out 2>msgpush_${expid}_${ip}.err &"; done'
34
- exports_1 = ' export expid="gci_go_1"'
35
- exports_2 = ' export expid="gci_go_2"'
36
- exports_3 = ' export expid="gci_go_3"'
37
- exports_4 = ' export expid="gci_go_4"'
38
- exports_5 = ' export expid="gci_go_5"'
66
+
67
+ [execution .gci .1 ]
68
+ exports = ' export expid="gci_go_1"'
69
+
70
+ [execution .gci .2 ]
71
+ exports = ' export expid="gci_go_2"'
72
+
73
+ [execution .gci .3 ]
74
+ exports = ' export expid="gci_go_3"'
75
+
76
+ [execution .gci .4 ]
77
+ exports = ' export expid="gci_go_4"'
78
+
79
+ [execution .gci .5 ]
80
+ exports = ' export expid="gci_go_5"'
0 commit comments