-
Notifications
You must be signed in to change notification settings - Fork 39.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
Add benchmark test to compare EvenPodsSpreadPriority and SelectorSpreadingPriority #84606
Conversation
/assign @Huang-Wei |
@alculquicondor There are some things I don't quite follow:
|
Yes, EvenPodsSpreadPriority has two constraints, but the test is using the same selector for both.
SelectorSpreadingPriority uses 2 values: the node name and the zone. That's what we are trying to replicate with the 2 constraints for EvenPodsSpread. We are not concerning about flexibility in this case. We just want to ensure that using those 2 exact constraints, we get similar performance for the same set of nodes and pods. |
45d77b3
to
335a334
Compare
One reason why SelectorSpreadingPriority is quicker is b/c its
|
I noticed that in the algorithm. However, we are using 100% in this test, to be more fair. |
@alculquicondor I misread the percentage, updated in #84606 (comment) Essentially, it's not about the percentage of how many nodes are "filtered", it's about whether or not we have a pre-calculation phase for a particular Priority. If we can skip the pre-calculation phase, for sure it's much faster. In other words, it's a "pure" map-reduce implementable Priority. |
They are different algorithms and SelectorSpreadPriority is skipping calculations by only going through the filtered nodes. However, if you consider the 100% of nodes, they are essentially doing the same calculations. SelectorSpread does the "precalculation" in Map, whereas EvenPodsSpread does it in metadata. But ultimately overall (at 100% nodes), they are doing the same. |
I think we can merge the benchmark for now and iterate over it as we try to bridge the gap. |
…adPriority Signed-off-by: Aldo Culquicondor <acondor@google.com>
335a334
to
75d5227
Compare
I just rebased onto the Map/Reduce implementation. Note that I'm including metadata calculation in the benchmarks. |
/test pull-kubernetes-e2e-gce-device-plugin-gpu |
/test pull-kubernetes-e2e-gce |
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
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alculquicondor, Huang-Wei 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 |
/retest Review the full test history for this PR. Silence the bot with an |
/kind feature
What this PR does / why we need it:
The added tests exercise EvenPodsSpreadPriority using constraints that have a similar effect to the hardcoded parameters to the SelectorSpreadingPriority algorithm.
Current results:
Note that EvenPodsSpreadPriority is rouglhy 5x slower than SelectorSpreadingPriority.
Which issue(s) this PR fixes:
Part of #80639
Does this PR introduce a user-facing change?:
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: