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

update document for FlavorFungibility #1226

Merged
merged 2 commits into from
Oct 25, 2023

Conversation

KunWuLuan
Copy link
Member

@KunWuLuan KunWuLuan commented Oct 19, 2023

What type of PR is this?

/kind documentation

What this PR does / why we need it:

update document for FlavorFungibility

Which issue(s) this PR fixes:

Special notes for your reviewer:

For issue #582

Does this PR introduce a user-facing change?

@k8s-ci-robot k8s-ci-robot added kind/documentation Categorizes issue or PR as related to documentation. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Oct 19, 2023
@netlify
Copy link

netlify bot commented Oct 19, 2023

Deploy Preview for kubernetes-sigs-kueue ready!

Name Link
🔨 Latest commit 953af68
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-kueue/deploys/653738803f3ab40008be87f0
😎 Deploy Preview https://deploy-preview-1226--kubernetes-sigs-kueue.netlify.app/docs/concepts/cluster_queue
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@k8s-ci-robot
Copy link
Contributor

Hi @KunWuLuan. 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. Regular contributors should join the org to skip this step.

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.

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.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 19, 2023
@alculquicondor
Copy link
Contributor

/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 Oct 19, 2023
@alculquicondor
Copy link
Contributor

/release-note-none

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Oct 19, 2023
Copy link
Member

@tenzen-y tenzen-y left a comment

Choose a reason for hiding this comment

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

/assign @trasc


When there is not enough nominal quota of resources in a ResourceFlavor, the incoming workload can borrow or preempt in ClusterQueue or Cohort.

By default the incoming workload will stop trying the next flavor if it can get enough resource by borrowing.
Copy link
Member

Choose a reason for hiding this comment

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

I think we should clarify what is the next flavor.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, we can remind readers that kueue evaluates the flavors in a ClusterQueue in order.

Copy link
Contributor

Choose a reason for hiding this comment

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

But generally, we introduce the possible options first, followed by what's the default.

Copy link
Member

Choose a reason for hiding this comment

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

agree.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure, I will update this


When there is not enough nominal quota of resources in a ResourceFlavor, the incoming workload can borrow or preempt in ClusterQueue or Cohort.

By default the incoming workload will stop trying the next flavor if it can get enough resource by borrowing.
Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, we can remind readers that kueue evaluates the flavors in a ClusterQueue in order.


When there is not enough nominal quota of resources in a ResourceFlavor, the incoming workload can borrow or preempt in ClusterQueue or Cohort.

By default the incoming workload will stop trying the next flavor if it can get enough resource by borrowing.
Copy link
Contributor

Choose a reason for hiding this comment

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

But generally, we introduce the possible options first, followed by what's the default.

Copy link
Contributor

@cortespao cortespao left a comment

Choose a reason for hiding this comment

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

Sending some editorial suggestions. Thanks!

- `Preempt`: ClusterQueue stops to try preempting in current ResourceFlavor and start from the next one if preempting failed.
- `TryNextFlavor` (default): ClusterQueue will try the next ResourceFlavor to see if the workload can fit in the ResourceFlavor.

Noted that if `whenCanBorrow` is `Borrow` and `whenCanPreempt` is `Preempt`, or both `whenCanBorrow` and `whenCanPreempt` is `TryNextFlavor`, borrowing has a higher priority than preemption.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Noted that if `whenCanBorrow` is `Borrow` and `whenCanPreempt` is `Preempt`, or both `whenCanBorrow` and `whenCanPreempt` is `TryNextFlavor`, borrowing has a higher priority than preemption.
To instruct Kueue to attempt to borrow first instead of preempt, you can use any of the following value combinations:
* `whenCanBorrow = "Borrow"` and `whenCanPreempt = "Preempt"`
* `whenCanBorrow = "TryNextFlavor"` and `whenCanPreempt = "TryNextFlavor"`

Copy link
Member Author

Choose a reason for hiding this comment

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

I think that such expression is sufficient to convey the meaning:

Note that whenever possible and the configured policy allows, Kueue tries to avoid preemptions by borrowing.

Copy link
Contributor

@alculquicondor alculquicondor left a comment

Choose a reason for hiding this comment

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

Final pass

Copy link
Contributor

@trasc trasc left a comment

Choose a reason for hiding this comment

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

One nit. Otherwise LGTM

preemptions or borrowing in a flavor before trying to accommodate the Workload in the next flavor, by
setting the `flavorFungibility` field.

A configuration for a ClusterQueue that configures this behavior looks like the following:
Copy link
Contributor

Choose a reason for hiding this comment

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

nit:

Suggested change
A configuration for a ClusterQueue that configures this behavior looks like the following:
The definition of a ClusterQueue that configures this behavior looks like the following:

"configuration .. that configures" sounds a bit strange to me.

Copy link
Contributor

@alculquicondor alculquicondor left a comment

Choose a reason for hiding this comment

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

/approve
Leaving /lgtm to @trasc

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alculquicondor, KunWuLuan

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

The pull request process is described 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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 24, 2023
@trasc
Copy link
Contributor

trasc commented Oct 25, 2023

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 25, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 2f37e805bf917806ebd1dd5d61f1c7e03fe51651

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/documentation Categorizes issue or PR as related to documentation. lgtm "Looks good to me", indicates that a PR is ready to be merged. 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/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants