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

[MIG-699] Keep k8s clients around to avoid cost of re-generating them all the time #1022

Closed
djwhatle opened this issue Mar 25, 2021 · 5 comments · Fixed by #1037
Closed

[MIG-699] Keep k8s clients around to avoid cost of re-generating them all the time #1022

djwhatle opened this issue Mar 25, 2021 · 5 comments · Fixed by #1037
Labels
kind/feature Categorizes issue or PR as related to a new feature. perf-scale

Comments

@djwhatle
Copy link
Contributor

We should measure how long it takes to build a client. My guess is that with the amount of times we re-build clients we may be incurring a significant cost.

@djwhatle djwhatle added kind/feature Categorizes issue or PR as related to a new feature. perf-scale labels Mar 25, 2021
@djwhatle
Copy link
Contributor Author

Wow. I knew this was an issue but not how much of an issue.

I just ran a migration that took 3 minutes, 4 seconds to complete.
Summing up the time spent on constructing a client, mig-controller spent 217,123 milliseconds creating clients.

Total Migration Time: 184 seconds
Client Creation Time: 217 seconds (parallel controllers)

That's 3.6 minutes of controller time creating clients (this is possible because there are multiple controllers) but wow. Keeping the clients in memory instead of recreating all over the place looks like it could have a huge impact on how quickly things could run.

@djwhatle
Copy link
Contributor Author

djwhatle commented Mar 27, 2021

This is pretty awesome. Running from my local machine: using a client we already created, migration time was decreased from 184 seconds to 70 seconds!

This means the migration only took 38% as long as originally.
Only 2 seconds were spent building clients instead of 217 seconds.

image

@djwhatle
Copy link
Contributor Author

keepclient.txt

@djwhatle
Copy link
Contributor Author

In-cluster results:

Not nearly as big of a difference, but definitely still a healthy improvement (10 seconds). It seems that the impact of this change may be related to latency. Running off my laptop it had a much bigger improvement. I suspect we would also see large improvement running across data centers, which is one of the performance areas for improvement we spotted.

Keep clients in memory (77 seconds)
image

Recreate clients (87 seconds)
image

@djwhatle
Copy link
Contributor Author

Will be resolved by #1037

@djwhatle djwhatle changed the title Keep k8s clients around to avoid cost of re-generating them all the time [MIG-699] Keep k8s clients around to avoid cost of re-generating them all the time Jun 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. perf-scale
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant