-
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
A summary of Workloads order in queues #168
Comments
Another concern is that for each update to the queue (new Workload added or removed), many Workloads statuses will need to be reconciled. This is expensive and can't be batched since the updates will need to be done for individual objects. Perhaps we can update the |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/lifecycle frozen |
I'm also very interested in this feature. Has there been any work in this direction? Are there workarounds that I can use now? |
No progress yet. The exact number is hard to calculate or even keep accurate, depending on how fast jobs are being created. It might be easier to give a time estimate based on historical data? Feel free to add proposals. cc @mimowo |
I mean the obvious solution would be to switch out the heap you mentioned for actual (distributed) queue(s). Out of curiosity, what were the reasons to use a heap data-structure when implementing a "kueue"? And what kind of heap are you using? Knowing this, I can better start to think about proposals. But another quick suggestion would be to store: Per Queue:
Per Workload:
Then, a workloads queue position could be evaluated as In this way, we'd only need to update 2 variables per queue instead of every node. Of course one have to figure out what happens when a workload is deleted, but I'm optimistic that a solution can be found. E.g.
|
@maaft IIUC the complication with the proposal is that workloads are ordered by priority and creationTimestamp's: https://github.com/kubernetes-sigs/kueue/blob/main/pkg/queue/cluster_queue_strict_fifo.go#L48-L58. So for a newly created workload with the highest priority the position will be Two proposals from me (I suppose the ideas can be combined):
@alculquicondor @ahg-g @maaft WDYT? |
Correct, a heap allows us to efficiently maintain a head that satisfies the criteria: A linked-list based queue would probably be too slow in clusters with lots of jobs. Back to proposals from @mimowo:
|
I was hoping to be able to instantiate a |
@mimowo Which cache are you referring to? |
The Kueue's server side cache. There is server-side printing: https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#additional-printer-columns, but apparently it only allows to use |
/assign @mimowo |
/reopen |
@tenzen-y: Reopened this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/close Follow up split in #1657 |
@alculquicondor: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
What would you like to be added:
For a pending Workload, I would like to know how many pods are ahead of it.
Of course, this has to be in a best-effort fashion, but it could get pretty accurate in a cluster with lots of long running jobs.
However, this is not trivial to implement, as we use a heap, not a literal queue.
Why is this needed:
To provide some level of prediction to end-users for how long their workload will be queued.
The text was updated successfully, but these errors were encountered: