Scheduler: when evicting don't normalise actualShare #3899
Merged
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.
Problem
There is currently a problem when
adjustedFairShare
is capped by demand.The scheduler caps
adjustedFairShare
tocost
at https://git.c3.zone/GR/armada/blob/69232402e78d1a420d56374415436fe15d2ebf0e/internal/scheduler/context/scheduling.go#L174However, when deciding whether to evict a job, it compares fair share to
actualShare = cost / totalCost
atarmada/internal/scheduler/preempting_queue_scheduler.go
Line 132 in 6923240
If
totalCost < 1
(which it often is for gpu clusters), dividing bytotalCost
inflatesactualShare
so that it thinksactualShare
is above fair share even for fairly undemanding users. So it evicts many jobs well below fair share.Solution
Get rid of the
/ totalCost
atpreempting_queue_scheduler.go#L132
This simplifies things, and makes it consistent between the two places. It also stops strange behavior for non-full clusters where totalCost may we well under 1, so actualShare gets inflated, and many jobs are evicted even though the cluster isn't full.