support min-max elastic quota scheduling #3702
Open
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.
Image this scene:queue has some guranteed quota called
Min
. Pods can be scheduled when queue's used quota + requests <= Min. And there is also a limit quota calledMax
, which means the upper quota a queue's tasks can used. While the quota between Min and Max can only be used by preemtable tasks in a queue, because those quota are borrowed from other queues' Min, and should be returned back when need. So preemtable pods can be scheduled when queue's used quota + requests <= Max.This feature also called Elastic Quota or Capacity Scheduling.
referance:
capacity-scheduling
Elastic Quota Management
This Pr will do those things base on capacity plugin:
Min
equals todeserved
andMax
equals tocapability
Min
if job's tasks are not preemptable, or queue's used will be underMax
if job's tasks are preemptable when schedule a job.Preemtive
function in capacity plugin to support check if queue's future used (a job's request + queue's allocated) is underMin
. Only a job in a queue whose futrue used will not exceed its Min can preemt other victims.relative issues: #3537
fixes #3703
The 1st commit is base on #3649, please merge that PR first.