-
Notifications
You must be signed in to change notification settings - Fork 204
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
perf: Implement timeouts and Max-batch size for Consolidation #472
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Allocatable() is called a lot. Memoize this using a sync.Map so we can avoid the expensive calculation. name old time/op new time/op delta Scheduling1-12 566µs ± 9% 362µs ±11% -36.06% (p=0.004 n=5+6) Scheduling50-12 26.2ms ± 4% 18.2ms ± 7% -30.43% (p=0.004 n=5+6) Scheduling100-12 53.1ms ± 8% 31.5ms ± 4% -40.76% (p=0.008 n=5+5) Scheduling500-12 272ms ± 5% 157ms ± 9% -42.23% (p=0.004 n=5+6) Scheduling1000-12 596ms ±11% 396ms ±19% -33.63% (p=0.004 n=5+6) Scheduling2000-12 1.08s ± 4% 0.82s ±10% -24.47% (p=0.004 n=5+6) Scheduling5000-12 2.83s ± 8% 1.88s ± 6% -33.46% (p=0.008 n=5+5)
This saves a lot of lookups and is measurably better.
engedaam
reviewed
Aug 16, 2023
Pull Request Test Coverage Report for Build 5874881988
💛 - Coveralls |
tzneal
approved these changes
Aug 16, 2023
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.
lgtm
Merging so we can get some test runs. |
5 tasks
9 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #370
Description
I ran some tests with KwoK and a cost monitoring tool to scale up clusters to 2000, 1500, 1000, 500, and 100 nodes. I tracked metrics like cumulative cost, cumulative pending pod seconds, and overall test time.
The test scaled down the clusters incrementally by 25% (100% -> 75% -> 50% -> 25%), waiting for Consolidation to fully scale down to the next level and exiting when the number of nodes got to 25% of the peak. With a timeout of 1 minute for Multi Machine Consolidation, 3 minutes for Single Machine Consolidation, and a max batch size of 100 machines for Multi, Karpenter was able to take more actions quicker, speeding up the whole test to 33 minutes.
How was this change tested?
make presubmit
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.