Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scheduler: when evicting don't normalise actualShare #3899

Merged
merged 1 commit into from
Sep 4, 2024

Conversation

robertdavidsmith
Copy link
Collaborator

@robertdavidsmith robertdavidsmith commented Sep 4, 2024

Problem

There is currently a problem when adjustedFairShare is capped by demand.

The scheduler caps adjustedFairShare to cost at https://git.c3.zone/GR/armada/blob/69232402e78d1a420d56374415436fe15d2ebf0e/internal/scheduler/context/scheduling.go#L174

However, when deciding whether to evict a job, it compares fair share to actualShare = cost / totalCost at

actualShare := sch.schedulingContext.FairnessCostProvider.UnweightedCostFromQueue(qctx) / totalCost

If totalCost < 1 (which it often is for gpu clusters), dividing by totalCost inflates actualShare so that it thinks actualShare is above fair share even for fairly undemanding users. So it evicts many jobs well below fair share.

Solution

Get rid of the / totalCost at preempting_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.

Signed-off-by: robersmi606 <robert.smith@gresearch.co.uk>
@robertdavidsmith robertdavidsmith enabled auto-merge (squash) September 4, 2024 13:47
@robertdavidsmith robertdavidsmith merged commit 86ff252 into master Sep 4, 2024
20 checks passed
@robertdavidsmith robertdavidsmith deleted the sendToGitHub/sched-no-div-total-cost branch September 4, 2024 13:51
@svc-gh-ghzonetrans-p svc-gh-ghzonetrans-p restored the sendToGitHub/sched-no-div-total-cost branch September 4, 2024 13:55
@robertdavidsmith robertdavidsmith deleted the sendToGitHub/sched-no-div-total-cost branch September 9, 2024 10:04
@svc-gh-ghzonetrans-p svc-gh-ghzonetrans-p restored the sendToGitHub/sched-no-div-total-cost branch September 9, 2024 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants