Unverified Commit ba791275 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #59671 from bsalamat/sched_queue_perf

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Improve performance of scheduling queue by adding a hash map to track all pods with a nominatedNodeName **What this PR does / why we need it**: Our investigations show that there is a performance regression in the new scheduling queue which is not enabled by default and is enabled only if "priority and preemption" which is an alpha feature is enabled. This PR is an important performance improvement for those who want to use priority and preemption in larger clusters. The PR adds a hash table to track nominated Pods so that finding such Pods will be faster. Other than improving performance, we don't expect this PR to change behavior of scheduler. **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 # ref/ #56032 ref/ #57471 **Special notes for your reviewer**: **Release note**: ```release-note NONE ``` /sig scheduling
parents 9438e14d df5fc094
......@@ -591,7 +591,7 @@ func (c *configFactory) updatePodInSchedulingQueue(oldObj, newObj interface{}) {
if c.skipPodUpdate(pod) {
return
}
if err := c.podQueue.Update(pod); err != nil {
if err := c.podQueue.Update(oldObj.(*v1.Pod), pod); err != nil {
runtime.HandleError(fmt.Errorf("unable to update %T: %v", newObj, err))
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment