Add a feature to the scheduler to score fewer than all nodes in every scheduling cycle#66733
Conversation
|
[MILESTONENOTIFIER] Milestone Pull Request: Up-to-date for process Pull Request Labels
|
There was a problem hiding this comment.
Why not do it all at once until filteredLen >= numNodesToFind?
There was a problem hiding this comment.
once you send work to parallelize you cannot stop in the middle.
There was a problem hiding this comment.
Adding a parameter to parallelize to control is a solution, or just redefining an interface to implement this functionality.
There was a problem hiding this comment.
Parallelize is a part of a client-go library. We cannot change its parameters, but I agree that having another Parallelize function, for example, ParallelizeUntil(..., condition) would be useful. That should be done as a separate PR though. Do you think you can add one that can be used here?
There was a problem hiding this comment.
Ok, when this PR is merged I will help implement it. :)
4f4e26c to
3875e5b
Compare
There was a problem hiding this comment.
Why is it 20, I think we need to have relevant comments to explain.
There was a problem hiding this comment.
20 is an arbitrary value. I added a comment to explain.
There was a problem hiding this comment.
numAllNodes will be better.
|
@bsalamat does this need/have a PR against the 1.12 docs branch? Looks like a major change. Thanks! |
There was a problem hiding this comment.
Let's not add anything to the deprecated flags.
There was a problem hiding this comment.
Since the componentconfig is still alpha, these options are not quite "deprecated"! 😉
Anyway, I removed it.
|
One comment about the flag. Otherwise sgtm. |
|
@jimangel Yes, I will write/update docs. |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bsalamat, fejta, k82cn, sttts The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
New changes are detected. LGTM label has been removed. |
|
/test all [submit-queue is verifying that this PR is safe to merge] |
|
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here. |
Automatic merge from submit-queue (batch tested with PRs 67555, 68196). If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md. Not split nodes when searching for nodes but doing it all at once **What this PR does / why we need it**: Not split nodes when searching for nodes but doing it all at once. **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes # **Special notes for your reviewer**: @bsalamat This is a follow up PR of #66733. #66733 (comment) **Release note**: ```release-note Not split nodes when searching for nodes but doing it all at once. ```
Automatic merge from submit-queue (batch tested with PRs 67555, 68196). If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md. Not split nodes when searching for nodes but doing it all at once **What this PR does / why we need it**: Not split nodes when searching for nodes but doing it all at once. **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes # **Special notes for your reviewer**: @bsalamat This is a follow up PR of #66733. kubernetes/kubernetes#66733 (comment) **Release note**: ```release-note Not split nodes when searching for nodes but doing it all at once. ``` Kubernetes-commit: a0b457d0e5ed54646fd01eac877efcea5be3216d
Automatic merge from submit-queue (batch tested with PRs 67555, 68196). If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md. Not split nodes when searching for nodes but doing it all at once **What this PR does / why we need it**: Not split nodes when searching for nodes but doing it all at once. **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes # **Special notes for your reviewer**: @bsalamat This is a follow up PR of #66733. kubernetes/kubernetes#66733 (comment) **Release note**: ```release-note Not split nodes when searching for nodes but doing it all at once. ``` Kubernetes-commit: a0b457d0e5ed54646fd01eac877efcea5be3216d
Automatic merge from submit-queue (batch tested with PRs 67555, 68196). If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md. Not split nodes when searching for nodes but doing it all at once **What this PR does / why we need it**: Not split nodes when searching for nodes but doing it all at once. **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes # **Special notes for your reviewer**: @bsalamat This is a follow up PR of #66733. kubernetes/kubernetes#66733 (comment) **Release note**: ```release-note Not split nodes when searching for nodes but doing it all at once. ``` Kubernetes-commit: a0b457d0e5ed54646fd01eac877efcea5be3216d
Automatic merge from submit-queue (batch tested with PRs 67555, 68196). If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md. Not split nodes when searching for nodes but doing it all at once **What this PR does / why we need it**: Not split nodes when searching for nodes but doing it all at once. **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes # **Special notes for your reviewer**: @bsalamat This is a follow up PR of #66733. kubernetes/kubernetes#66733 (comment) **Release note**: ```release-note Not split nodes when searching for nodes but doing it all at once. ``` Kubernetes-commit: a0b457d0e5ed54646fd01eac877efcea5be3216d
What this PR does / why we need it:
Today, the scheduler scores all the nodes in the cluster in every scheduling cycle (every time a posd is attempted). This feature implements a mechanism in the scheduler that allows scoring fewer than all nodes in the cluster. The scheduler stops searching for more nodes once the configured number of feasible nodes are found. This can help improve the scheduler's performance in large clusters (several hundred nodes and larger).
This PR also adds a new structure to the scheduler's cache, called NodeTree, that allows scheduler to iterate over various nodes in different zones in a cluster. This is needed to avoid scoring the same set of nodes in every scheduling cycle.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close the issue(s) when PR gets merged):Fixes #66627
Special notes for your reviewer:
This is a large PR, but broken into a few logical commits. Reviewing would be easier if you review by commits.
Release note: