Skip to content
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

Evaluation on docker stats #5

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

majalinderholm
Copy link
Collaborator

@majalinderholm majalinderholm commented Dec 2, 2020

DO NOT MERGE

This branch can be used for collecting stats from our enhanced implementation and make evaluation on collected stats with data using three workers on the original implementation and enhanced implementation.

Collect stats:

  • When you run the application using start_training.sh you will automatically collect data every 0.5s
  • When training is complete the collection process needs to be killed manually. Run ps aux | grep start_training which will generate two outputs containing ID in the second column. Run kill <ID> where the ID can be found in the second column in one of the two outputs from previous

Evaluate stats:

  • Run eval_stats.py in performance folder
  • Able to evaluate only three workers
  • Will throw a bunch of errors but it works fine anyways
  • In order to get stats from the original implementation you can to add the changes in start_training.sh and collect_stats.sh in a folder namned performance in Felix's master branch (do not push) in the same way it's implemented in this branch

Future work:

  • Make evaluation for more than three workers

Graphs that I got can be found here

…utomatically removed

2. Added a shell script collect_stats.sh that will collect docker container stats when you run start_training.sh
…ontinue with implementing comparison between the two implementations
…ced implementation in the same plot for CPU %. Need to fix for memory usage
… for three workers with graphs showing accumulated values over time
Copy link
Collaborator

@GallonSong GallonSong left a comment

Choose a reason for hiding this comment

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

Good job! Several comments in the code.

@@ -0,0 +1,5 @@
while true;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this file still needed?

@@ -23,6 +23,9 @@ fi

if [ "$SCENARIO" == "local" ];
then
cd performance
./collect_stats.sh &
cd -
Copy link
Collaborator

Choose a reason for hiding this comment

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

(1/2) How about replacing these 3 lines with 1 line sh ./performance/collect_stats.sh &, and also make a small change in collect_stats.sh, see (2/2)

@@ -0,0 +1,5 @@
while true;
do
docker stats --format "table {{.Name}},{{.CPUPerc}},{{.MemUsage}},{{.MemPerc}}" --no-stream >> stats.csv
Copy link
Collaborator

Choose a reason for hiding this comment

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

(2/2) Follow comment (1/2), change this line to **** >> performance/stats.csv

blue = mpatches.Patch(color='blue', label='Original implementation')
plt.legend(handles=[red, blue])
plt.title('Accumulated Sum of Workers Memory Usage')
plt.show()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice plots and handling the data with Pandas!
A small suggestion: wrapping repeated code blocks into reusable functions, time-saving and easier for future maintenance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants