Skip to content

KEP-9734: Historical Borrowing based DRS Fair Sharing#9737

Open
mukund-wayve wants to merge 2 commits intokubernetes-sigs:mainfrom
mukund-wayve:kep-9734-historical-usage-fair-sharing
Open

KEP-9734: Historical Borrowing based DRS Fair Sharing#9737
mukund-wayve wants to merge 2 commits intokubernetes-sigs:mainfrom
mukund-wayve:kep-9734-historical-usage-fair-sharing

Conversation

@mukund-wayve
Copy link
Contributor

What type of PR is this?

/kind kep

What this PR does / why we need it:

Creates a KEP for #9734

Which issue(s) this PR fixes:

Part of #9734

Special notes for your reviewer:

Does this PR introduce a user-facing change?

NONE

Change from historical usage to historical borrowing

Cut down the length as much as possible
@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/kep Kueue Enhancement Proposal (Design) labels Mar 7, 2026
@netlify
Copy link

netlify bot commented Mar 7, 2026

Deploy Preview for kubernetes-sigs-kueue canceled.

Name Link
🔨 Latest commit 8ae9517
🔍 Latest deploy log https://app.netlify.com/projects/kubernetes-sigs-kueue/deploys/69ac27ea1642d40008280b49

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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

Details 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

@k8s-ci-robot
Copy link
Contributor

Hi @mukund-wayve. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Tip

We noticed you've done this a few times! Consider joining the org to skip this step and gain /lgtm and other bot rights. We recommend asking approvers on your previous PRs to sponsor you.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Mar 7, 2026
@k8s-ci-robot k8s-ci-robot requested review from kannon92 and kshalot March 7, 2026 13:21
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Mar 7, 2026
@mukund-wayve mukund-wayve marked this pull request as ready for review March 7, 2026 13:28
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 7, 2026
@pajakd
Copy link
Contributor

pajakd commented Mar 9, 2026

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 9, 2026
@mimowo
Copy link
Contributor

mimowo commented Mar 9, 2026

cc @mwielgus


```
borrowing(r) = max(0, usage(r) - quota(r))
borrowing_sum(r) = (1 - α) × previous_borrowing_sum(r) + α × borrowing(r)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For α = 1 this is exactly the current behavior?

preemption target selection, so that the two mechanisms are consistent.

* Preserve the preemption loop-free property that the current DRS-based fair
sharing guarantees.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the current DRS-based fair sharing we have a proof that it is loop-free https://kueue.sigs.k8s.io/docs/concepts/fair_sharing/#proof-that-two-workloads-wont-preempt-each-other

Here it'll be a little more tricky as the DRS will change over time without any new admission. So the proof will not hold (I think).

Lets say we have a setup like this:

  • cohort (1 quota):
  • CQ1 (no quota), workload wl1 requiring 1 quota
  • CQ2 (no quota), workload wl2 requiring 1 quota

Lets say these are workloads that take a long time to finish.

I think in your proposal wl1 and wl2 will keep preempting each other, right? With wl1 admitted the new DRS will keep increasing until eventually it will be preempted by wl2 and so on.

Its not necessarily a bad thing if the preemptions will not be too frequent -- it might be even desirable, as this is more fair to do such "multiplexing" instead of allowing wl1 to run until completion. But this is a different property than for the current algorithm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/kep Kueue Enhancement Proposal (Design) ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants