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

Make QueueSet support exempt behavior; use it #118955

Merged
merged 1 commit into from Jul 4, 2023

Conversation

MikeSpreitzer
Copy link
Member

What type of PR is this?

/kind feature

What this PR does / why we need it:

This PR makes the API Priority and Fairness implementation more regular, by making the QueueSet abstraction support the behavior of being exempt from limitation and making the config-consuming APF controller utilize that new behavior (rather than working around the lack of it).

This contributes to the implementation of a new feature, borrowing by the exempt priority level. In the PR at hand that borrowing is limited to zero seats (i.e., effectively disabled). #118782 adds the configuration of this borrowing.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Currently #118782 contains a duplicate of this PR; once this one merges, I will rebase #118782 and eliminate the duplication.

Does this PR introduce a user-facing change?

NONE

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

[KEP]: https://github.com/kubernetes/enhancements/tree/master/keps/sig-api-machinery/1040-priority-and-fairness#dispatching

/cc @wojtek-t
@tkashem
@deads2k

@k8s-ci-robot k8s-ci-robot added 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. kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. area/apiserver sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. approved Indicates a PR has been approved by an approver from all required OWNERS files. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Jun 29, 2023
Signed-off-by: Mike Spreitzer <mspreitz@us.ibm.com>
@MikeSpreitzer
Copy link
Member Author

/test pull-kubernetes-e2e-gce-100-performance

@jiahuif
Copy link
Member

jiahuif commented Jun 29, 2023

/assign @wojtek-t
/triage accepted

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jun 29, 2023
@MikeSpreitzer
Copy link
Member Author

/test pull-kubernetes-e2e-gce-100-performance

@MikeSpreitzer
Copy link
Member Author

@MikeSpreitzer

if currentCL > 0 {
concurrencyDenominator = currentCL
} else {
concurrencyDenominator = int(math.Max(1, math.Round(float64(cfgCtlr.serverConcurrencyLimit)/10)))
Copy link
Member

Choose a reason for hiding this comment

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

How did you choose the "concurrencyLimit/10"?

Why e.g. not "concurrencyLimit/5" or "concurrencyLimit/20"?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's just a number I pulled out of the air. We have to do something, and I thought this is as good a choice as any. If you want to argue for a better specific choice, go ahead. I do not think it worth the trouble to make this configurable.

if state.pl.Spec.Limited != nil {
meal.shareSum += float64(state.pl.Spec.Limited.NominalConcurrencyShares)
}
nominalConcurrencyShares, _, _ := plSpecCommons(state.pl)
Copy link
Member

Choose a reason for hiding this comment

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

nit: what I was originally asking for is to split the refactorings (e.g. things like introducing plSpecCommons function or changed apf_controller_debug.go) which are easy to review and makes the main PR smaller [and thus easier to review]. But I guess it might be too late now...

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 am not sure I understand. The plSpecCommons function is a small part of this PR. This PR is much smaller than #118782 .

Copy link
Member

Choose a reason for hiding this comment

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

plSpecCommons + all plumbing of it + apf_controler_debug, etc. are maybe not majority, but non-negligible part
and these are no-brainer and trivial to reason about
given that review is exponential to the size of PR, even if that's 1/3rd of PR, the impact on review time is actually quite significant :)

Copy link
Member

Choose a reason for hiding this comment

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

That said - as I mentioned, it's probably too late.
I managed to go over it and it looks fine now.

@MikeSpreitzer
Copy link
Member Author

I looked at the metrics from the run of pull-kubernetes-e2e-gce-100-performance and they look sensible. Following are some graphs.

Screen Shot 2023-07-03 at 2 07 34 PM Screen Shot 2023-07-03 at 2 12 22 PM Screen Shot 2023-07-03 at 2 18 58 PM

@wojtek-t
Copy link
Member

wojtek-t commented Jul 4, 2023

/lgtm
/approve

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

LGTM label has been added.

Git tree hash: c8686a31af10ab98000a982db6bd3c99594952b9

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: MikeSpreitzer, wojtek-t

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 merged commit 5f63d1f into kubernetes:master Jul 4, 2023
13 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.28 milestone Jul 4, 2023
@MikeSpreitzer MikeSpreitzer deleted the add-exempt-queuesets branch July 6, 2023 04:19
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. area/apiserver cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. release-note-none Denotes a PR that doesn't merit a release note. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants