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

Preemption during flavor assignment ambiguous #4135

Open
gabesaba opened this issue Feb 3, 2025 · 2 comments
Open

Preemption during flavor assignment ambiguous #4135

gabesaba opened this issue Feb 3, 2025 · 2 comments
Assignees
Labels
kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt.

Comments

@gabesaba
Copy link
Contributor

gabesaba commented Feb 3, 2025

What would you like to be cleaned:
It is possible that we assign mode Preempt, even when preemption is never possible. E.g. imagine the case that the CQ never allows preemption, and yet the workload's requests are below nominal quota.

// Check if preemption is possible
mode := noFit
if val <= rQuota.Nominal {
mode = preempt
if a.oracle.IsReclaimPossible(log, a.cq, *a.wl, fr, val) {
mode = reclaim
}
} else if a.canPreemptWhileBorrowing() {
mode = preempt
}

However, the fact that we chose Preempt and not NoFit is later used to reserve resources that belong to the CQ - see #4105.

Nevertheless, this is confusing. Something like the following categories may make more sense:

NeverFit - current NoFit, where workload is too big even if cluster is empty
NoFit - workload can fit if no workloads are running, but it has to wait, as preemption is not an option
Preemption
Fit

/cc @mimowo

@gabesaba gabesaba added the kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. label Feb 3, 2025
@gabesaba
Copy link
Contributor Author

gabesaba commented Feb 3, 2025

/assign @gabesaba

@mimowo
Copy link
Contributor

mimowo commented Feb 3, 2025

The fact that NeverFit workloads are handled as NoFit might be even considered a bug currently, because such a workload blocks indefinitely other "valid" workloads without a clear response saying "why".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt.
Projects
None yet
Development

No branches or pull requests

2 participants