-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Only copy new or modified files into VM on restart #5864
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: priyawadhwa The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
e958862
to
a2e123b
Compare
Codecov Report
@@ Coverage Diff @@
## master #5864 +/- ##
==========================================
- Coverage 36.5% 36.32% -0.18%
==========================================
Files 110 110
Lines 8123 8162 +39
==========================================
Hits 2965 2965
- Misses 4769 4808 +39
Partials 389 389
|
76b81bc
to
822a336
Compare
When minikube restarts, we can save time by only copying over files that have changes or don't exist in the VM. The code in this PR first checks if the file already exists in the VM, and skips copying it over again if it does.
822a336
to
38823e9
Compare
/ok-to-test |
Error: running mkcmp: exit status 1 |
Also, copy over the mtime correctly in Copy so that we can make sure they are equal in `sameFileExists`
All Times minikube: [ 199.063633 206.319336 206.711071] Average minikube: 204.031347 Averages Time Per Log
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! This PR appears to save 8-10 seconds off of a restart. Specifically, it makes live start
2X faster (8.87s vs 16.24s) and stopped 'start' about 10% faster (56s vs 65s)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
Timed restart 3x on my Mac: All Times master.minikube: [ 59.438086 57.969959 57.576127] Average master.minikube: 58.328057 Averages Time Per Log
|
Error: building minikube at head: updating minikube master branch: running [git pull origin master] in /home/performance-monitor/minikube: |
/ok-to-test |
I believe the reason you aren't seeing the performance increase is because I did some reading through the logs though, and your PR has a dramatic 7X improvement for Anyways, this appears to work really well. Next step for this sort of improvement: see if we can skip loading the image if the cached hash matches what the remote container runtime has already. |
/ok-to-test |
When minikube restarts, we can save time by only copying over files that
have changes or don't exist in the VM. The code in this PR first checks
if the file already exists in the VM, and skips copying it over again if
it does.
Relevant logs on restart w/ this change:
Right now, mkcmp only tracks performance for
minikube start
after aminikube delete
. I'll either update mkcmp to also look at restarts, or comment w/ timings from my local machine (this would be much faster).