Skip to content

Experiment descriptor #4

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

Merged
merged 11 commits into from
Aug 21, 2018
Merged

Experiment descriptor #4

merged 11 commits into from
Aug 21, 2018

Conversation

dfquaresma
Copy link
Member

This PR fix #3.

@dfquaresma dfquaresma added the enhancement New feature or request label Aug 17, 2018
@dfquaresma dfquaresma self-assigned this Aug 17, 2018
exports = 'export outdir="stateless"; export expdir=${PWD}'

# killall: kill all processes started by the experiment.
killall = 'for ip in $ip1 $ip2 $ip3 $ip4; do ssh -i ${sshkey} ubuntu@${ip} "killall java 2>/dev/null; rm gc.log shed_${expid}_${ip}.csv 2>/dev/null; killall mon.sh 2>/dev/null; killall gci-proxy 2>/dev/null; rm proxy.* 2>/dev/null;"; done'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

killall should not do file cleanups if it is strictly necessary.

rm gc.log shed_${expid}_${ip}.csv 2>/dev/null;
rm proxy.* 2>/dev/null;

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

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'

# cleanup: killall processes, removes files and revert configuration changes done by the experiment run.
cleanup = 'ssh -i ${sshkey} ubuntu@${lb} "rm *${expid}*"; for ip in $ip1 $ip2 $ip3 $ip4; do ssh -i ${sshkey} ubuntu@${ip} "killall java; killall mon.sh; killall gci-proxy 2>/dev/null; rm proxy.* 2>/dev/null; rm *${expid}_${ip}*"; done'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cleanup should not kill processes (killall does)

killall java; killall mon.sh; killall gci-proxy 2>/dev/null

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

setup = 'git clone http://github.com/gcinterceptor/gci-java && cd gci-java/ && ./build.sh; mv core/src/main/java/libgc.so ${expdir}; cd ${expdir}; git clone http://github.com/gcinterceptor/msgpush-java && cd msgpush-java && mvn clean package; cp experiments/mon.sh ${expdir}; cd target/ && mv msgpush-0.0.1-SNAPSHOT.jar msgpush-java.jar; cp msgpush-java.jar ${expdir}; cd ${expdir}; for ip in $ip1 $ip2 $ip3 $ip4; do scp -i ${sshkey} mon.sh ubuntu@${ip}:~/; scp -i ${sshkey} msgpush-java.jar ubuntu@${ip}:~/; scp -i ${sshkey} libgc.so ubuntu@${ip}:~/; done; go get -u github.com/gcinterceptor/gci-proxy; go get -u github.com/julienschmidt/httprouter; 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; cd ${expdir}'

# load: trigger the load.
load = 'ssh -i ${sshkey} ubuntu@${lb} "sudo rm /var/log/nginx/*.log; sudo service nginx restart; killall vegeta >/dev/null 2>&1; echo \"GET http://127.0.0.1/\" | ./vegeta attack -duration=120s -rate=30 | tee results.bin | ./vegeta report >client_${expid}.out 2>client_${expid}.err";'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we should have the warmup. Please refer to msgpush-go experiment:

#load: trigger the load.
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"; for ip in $ip1 $ip2 $ip3 i p 4 ; d o s s h i {sshkey} ubuntu@${ip} "truncate -s 0 ${expid}_${ip}"; done; ssh -i ${sshkey} ubuntu@${lb} "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"'

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not done. Please do.

exports = 'export expid="nogci_java_5"'

[execution.gci]
start = 'for ip in $ip1 $ip2 $ip3 $ip4; do ssh -i ${sshkey} ubuntu@${ip} "killall java 2>/dev/null; rm gc.log shed.csv 2>/dev/null; killall mon.sh 2>/dev/null; USE_GCI=true WINDOW_SIZE=1 MSG_SIZE=262144 YOUNG_GEN=256000000 nohup java -Djvmtilib=~/libgc.so -server -Xms512m -Xmx512m -Xlog:gc:file=gc.log -XX:+UseG1GC -XX:+ExplicitGCInvokesConcurrent -XX:+UnlockExperimentalVMOptions -XX:G1NewSizePercent=50 -XX:G1MaxNewSizePercent=50 -Dserver.port=8080 -jar msgpush-java.jar >msgpush-java_${expid}_${ip}.out 2>msgpush-java_${expid}_${ip}.err & nohup ./mon.sh >cpu_${expid}_${ip}.csv 2>/dev/null &"; done; ssh -i ${sshkey} ubuntu@${ip} "killall gci-proxy 2>/dev/null; rm proxy.* 2>/dev/null; ./gci-proxy --port 3000 --url http://localhost:8080 --ygen=67108864 --tgen=6710886 >proxy_${expid}_${ip}.out 2>proxy_${expid}_${ip}.err &";'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to kill or do any cleanups here (yes, we need to fix msgpush-go as well).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


[execution.no_gci]
# start: start all processes needed by the experiment run. Update some values to execute correctly the experiment.
start = 'for ip in $ip1 $ip2 $ip3 $ip4; do ssh -i ${sshkey} ubuntu@${ip} "killall java 2>/dev/null; rm gc.log shed.csv 2>/dev/null; killall mon.sh 2>/dev/null; USE_GCI=false WINDOW_SIZE=1 MSG_SIZE=262144 YOUNG_GEN=256000000 nohup java -server -Xms512m -Xmx512m -Xlog:gc:file=gc.log -XX:+UseG1GC -XX:+DisableExplicitGC -Dserver.port=3000 -jar msgpush-java.jar >msgpush-java_${expid}_${ip}.out 2>msgpush-java_${expid}_${ip}.err & nohup ./mon.sh >cpu_${expid}_${ip}.csv 2>/dev/null &"; done;'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to kill or do any cleanups here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

exports = 'export expid="nogci_java_5"'

[execution.gci]
start = 'for ip in $ip1 $ip2 $ip3 $ip4; do ssh -i ${sshkey} ubuntu@${ip} "killall java 2>/dev/null; rm gc.log shed.csv 2>/dev/null; killall mon.sh 2>/dev/null; USE_GCI=true WINDOW_SIZE=1 MSG_SIZE=262144 YOUNG_GEN=256000000 nohup java -Djvmtilib=~/libgc.so -server -Xms512m -Xmx512m -Xlog:gc:file=gc.log -XX:+UseG1GC -XX:+ExplicitGCInvokesConcurrent -XX:+UnlockExperimentalVMOptions -XX:G1NewSizePercent=50 -XX:G1MaxNewSizePercent=50 -Dserver.port=8080 -jar msgpush-java.jar >msgpush-java_${expid}_${ip}.out 2>msgpush-java_${expid}_${ip}.err & nohup ./mon.sh >cpu_${expid}_${ip}.csv 2>/dev/null &"; done; ssh -i ${sshkey} ubuntu@${ip} "killall gci-proxy 2>/dev/null; rm proxy.* 2>/dev/null; ./gci-proxy --port 3000 --url http://localhost:8080 --ygen=67108864 --tgen=6710886 >proxy_${expid}_${ip}.out 2>proxy_${expid}_${ip}.err &";'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WINDOW_SIZE=0 ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@dfquaresma
Copy link
Member Author

Thanks for review @danielfireman! I'm working on the requested changes

setup = 'git clone http://github.com/gcinterceptor/gci-java && cd gci-java/ && ./build.sh; mv core/src/main/java/libgc.so ${expdir}; cd ${expdir}; git clone http://github.com/gcinterceptor/msgpush-java && cd msgpush-java && mvn clean package; cp experiments/mon.sh ${expdir}; cd target/ && mv msgpush-0.0.1-SNAPSHOT.jar msgpush-java.jar; cp msgpush-java.jar ${expdir}; cd ${expdir}; for ip in $ip1 $ip2 $ip3 $ip4; do scp -i ${sshkey} mon.sh ubuntu@${ip}:~/; scp -i ${sshkey} msgpush-java.jar ubuntu@${ip}:~/; scp -i ${sshkey} libgc.so ubuntu@${ip}:~/; done; go get -u github.com/gcinterceptor/gci-proxy; go get -u github.com/julienschmidt/httprouter; 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; cd ${expdir}'

# load: trigger the load.
load = 'ssh -i ${sshkey} ubuntu@${lb} "sudo rm /var/log/nginx/*.log; sudo service nginx restart; killall vegeta >/dev/null 2>&1; echo \"GET http://127.0.0.1/\" | ./vegeta attack -duration=120s -rate=30 | tee results.bin | ./vegeta report >client_${expid}.out 2>client_${expid}.err";'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not done. Please do.

@danielfireman danielfireman merged commit 6a2b52a into master Aug 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Experiment descriptor
2 participants