volcano icon indicating copy to clipboard operation
volcano copied to clipboard

:Draft feat: Add dequeue strategies support for queue scheduling

Open kingeasternsun opened this issue 4 months ago • 4 comments

What type of PR is this?

/kind feature

What this PR does / why we need it:

This PR introduces dequeue strategies for Volcano queues, allowing administrators to control how jobs are scheduled within queues when resources are limited.

Key Features: Defined DequeueStrategy type with two supported strategies:

  1. FIFO Strategy

    • The scheduler repeatedly tries to dequeue the first task in the queue.
    • If the first task cannot be dequeued (e.g., insufficient resources), it will keep retrying without skipping to the next task.
  2. Traversal Strategy

    • If the first task cannot be dequeued, the scheduler skips it and attempts to dequeue the next jobs in the queue sequentially.

Which issue(s) this PR fixes:

Fixes #4572 #4690 #3950

Special notes for your reviewer:

  1. Backward Compatibility: This change is fully backward compatible. Existing queues without dequeue strategy annotations will continue to use the traverse strategy (current default behavior).

Does this PR introduce a user-facing change?

support FIFO dequeue strategies for Volcano queues..

Additional Context:

This feature addresses common scheduling scenarios where different queues require different behavior patterns:

  • Production queues often need strict ordering and can tolerate some resource underutilization
  • Development/testing queues typically prioritize maximum resource utilization over strict ordering

The implementation uses a unified scheduling loop with conditional logic, making it maintainable and efficient while providing clear behavioral differences between the two strategies.

kingeasternsun avatar Aug 29 '25 09:08 kingeasternsun

good feature, I think it's useful, also needed by https://github.com/volcano-sh/volcano/issues/4690

JesseStutler avatar Nov 04 '25 06:11 JesseStutler

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Once this PR has been reviewed and has the lgtm label, please assign wpeng102 for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

volcano-sh-bot avatar Nov 24 '25 02:11 volcano-sh-bot

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Once this PR has been reviewed and has the lgtm label, please assign wpeng102 for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

volcano-sh-bot avatar Nov 24 '25 02:11 volcano-sh-bot

Please rebase your codes, BTW, image, just a reminder, when writing commits, please clearly describe the changes made, and avoid vague information such as "fix" or "add crd". @kingeasternsun

JesseStutler avatar Dec 10 '25 06:12 JesseStutler