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

feat(overcommit): add realtime overcommit advisor plugin #472

Merged
merged 2 commits into from
Apr 28, 2024

Conversation

WangZzzhe
Copy link
Collaborator

@WangZzzhe WangZzzhe commented Feb 7, 2024

What type of PR is this?

Enhancements

What this PR does / why we need it:

katalyst-agent:

  • Add overcommitment aware advisor plugin, calculate node CPU and memory overcommit ratio by realtime metrics and pod requests resource. These datas will be reported to Apiserver in KCNR annotation.
  • report kubelet topology provider and policy in KCNR annotation for fitting node resource when there is cpu bind on node.

katalyst-controller:

  • watch KCNR and patch reported overcommit ratio to node.
  • watch KCNR and patch node allocatable resource after cpu binding to node.

katalyst-webhook:

  • calculate node actual allocatable by min(user set overcommit ratio, node reported overcommit ratio, node allocatable resource after cpu binding)

katalyst-scheduler:

  • add a new schedule plugin, which fit node resource when node topology policy is static.

PR in katalyst-api: kubewharf/katalyst-api#75 go.mod should be updated after api PR merged

Copy link

codecov bot commented Feb 7, 2024

Codecov Report

Attention: Patch coverage is 67.79891% with 237 lines in your changes are missing coverage. Please review.

Project coverage is 55.78%. Comparing base (b122f7b) to head (88bd3ae).
Report is 36 commits behind head on main.

Files Patch % Lines
...or/plugin/overcommitmentaware/realtime/realtime.go 72.51% 38 Missing and 20 partials ⚠️
...or/plugin/overcommitmentaware/reporter/reporter.go 62.16% 44 Missing and 12 partials ⚠️
pkg/controller/overcommit/node/node.go 78.62% 20 Missing and 11 partials ⚠️
...plugin/overcommitmentaware/overcommitment_aware.go 0.00% 18 Missing ⚠️
...options/sysadvisor/overcommit/realtime/realtime.go 58.53% 17 Missing ⚠️
pkg/controller/overcommit/node/handler.go 39.28% 11 Missing and 6 partials ⚠️
pkg/webhook/mutating/node/allocatable_mutator.go 82.35% 5 Missing and 10 partials ⚠️
pkg/util/native/pod_resource.go 39.13% 9 Missing and 5 partials ⚠️
pkg/util/overcommit/overcommit.go 61.11% 4 Missing and 3 partials ⚠️
...s/sysadvisor/overcommit/overcommit_aware_plugin.go 70.00% 3 Missing ⚠️
... and 1 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #472      +/-   ##
==========================================
+ Coverage   55.67%   55.78%   +0.11%     
==========================================
  Files         552      524      -28     
  Lines       59419    48534   -10885     
==========================================
- Hits        33083    27077    -6006     
+ Misses      22899    18025    -4874     
+ Partials     3437     3432       -5     
Flag Coverage Δ
unittest 55.78% <67.79%> (+0.11%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@WangZzzhe WangZzzhe self-assigned this Feb 7, 2024
@WangZzzhe WangZzzhe added enhancement New feature or request workflow/need-review review: test succeeded, need to review labels Feb 7, 2024
@WangZzzhe WangZzzhe force-pushed the dev/overcommit-bindcpu branch 2 times, most recently from 5e30800 to f102e73 Compare March 15, 2024 11:47
@WangZzzhe WangZzzhe force-pushed the dev/overcommit-bindcpu branch 2 times, most recently from c784dd7 to aca204b Compare April 10, 2024 02:32
caohe
caohe previously approved these changes Apr 10, 2024
@WangZzzhe WangZzzhe force-pushed the dev/overcommit-bindcpu branch 3 times, most recently from d3c570a to b777c62 Compare April 15, 2024 03:45
caohe
caohe previously approved these changes Apr 15, 2024
@WangZzzhe WangZzzhe force-pushed the dev/overcommit-bindcpu branch 2 times, most recently from 6441f1a to 992b136 Compare April 17, 2024 11:30
@luomingmeng luomingmeng merged commit b1af056 into kubewharf:main Apr 28, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request workflow/need-review review: test succeeded, need to review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants