Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
change sort function of scheduling queue to avoid starvation when a lot of unscheduleable pods are in the queue #72619
What type of PR is this?
What this PR does / why we need it:
This changes the sort function of scheduler (priority queue) to prevent starvation (some pods don't get chance to schedule very long time).
#71488, which resolved #71486, alleviates starvation by taking
This PR changes:
Special notes for your reviewer:
I'm concerned with the decrease of scheduler throughput and the increase of k8s API server load because of the change. I think performance test would be needed to understand how much impact does the PR have on them.
Does this PR introduce a user-facing change?:
Hi @everpeace. Thanks for your PR.
I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with
Once the patch is verified, the new status will be reflected by the
I understand the commands that are listed here.
bsalamat left a comment
Thanks, @everpeace! The change looks good to me. Your concern with respect to increase in the API server load is valid, but even before this change it was likely that the condition.message of the pod would change after a scheduling retry, causing a request to be sent to the API server. The message contains detailed information about how many nodes were considered and what predicates failed for nodes. So, in larger clusters with higher churn the message would change somewhat frequently, causing a new request to be sent to the API server. After this PR all the scheduling attempts would send a request to the API server which may make things worse than before, but I don't expect a major issue.
[APPROVALNOTIFIER] This PR is APPROVED
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
@bsalamat Thanks for your review!! It's my first time to contribute to kube-scheduler actually :-)
oh, yeah, That's right