-
Notifications
You must be signed in to change notification settings - Fork 262
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
Can we preempt in more than one CQ per cohort in a cycle? #2596
Comments
Maybe we can allow more preemptions, as long as each workload is preempting different workloads. But my gut feeling is that, in most scenarios, multiple CQs will be trying to preempt the same workloads. Another avenue could be to combine the above suggestion with excluding terminating workloads from the preemption target calculations. This way, each CQ would try to preempt workloads that were not chosen by other CQs already. But we could be at risk of doing unnecessary preemptions if one of the workloads that is stuck in termination is big enough to make space for multiple workloads that needed preemption. |
cc @gabesaba |
Let's start with this, as it can help in the cases when multiple CQs are preempting their own workloads. /assign @gabesaba |
I think that there is a problematic case even when the sets of workloads preempted are disjoint - suppose both CQs need some remaining |
handled this case in #2641 |
Note: opening this more of as a discussion, rather than something that can be worked on right away.
If a CQ needs a preemption, and such preemption is taking a long time (because of the grace period), then this blocks other preemptions in the same cohort:
kueue/pkg/scheduler/scheduler.go
Lines 233 to 238 in 6248b58
Can we take a more optimistic approach and allow other CQs to preempt?
A problematic scenario could be as follows:
a
from CQ A needs to preemptx
,y
.b
from CQ B needs to preempty
andz
.Now
x
,y
andz
are successfully preempted, so Workloada
can fit. But workloadb
cannot longer fit, becausea
took the space ofy
. There are 2 possibilities:b
can preempt something else, in which case the situation should resolve by itself in the next iterations.b
can't preempt anything else, in which case we preemptedz
unnecessarily.The text was updated successfully, but these errors were encountered: