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

support utilization based canonical cpu headroom policy #59

Merged

Conversation

luomingmeng
Copy link
Collaborator

What type of PR is this?

Features

What this PR does / why we need it:

To increase the utilization of reclaimed_cores pool, the cpu headroom report to cnr can be oversold to schedule more reclaimed_cores workload to the machine

Which issue(s) this PR fixes:

Special notes for your reviewer:

@luomingmeng luomingmeng added enhancement New feature or request workflow/draft draft: no need to review labels May 10, 2023
@luomingmeng luomingmeng added this to the v0.2 milestone May 10, 2023
@luomingmeng luomingmeng self-assigned this May 10, 2023
@luomingmeng luomingmeng force-pushed the dev/support_dynamic_headroom_policy branch 2 times, most recently from 270a6b4 to e1b5e39 Compare May 10, 2023 05:51
@codecov
Copy link

codecov bot commented May 10, 2023

Codecov Report

Patch coverage: 69.47% and project coverage change: +0.23 🎉

Comparison is base (21d86d9) 51.30% compared to head (70b628a) 51.54%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #59      +/-   ##
==========================================
+ Coverage   51.30%   51.54%   +0.23%     
==========================================
  Files         318      325       +7     
  Lines       32418    32999     +581     
==========================================
+ Hits        16632    17009     +377     
- Misses      13840    13996     +156     
- Partials     1946     1994      +48     
Flag Coverage Δ
unittest 51.54% <69.47%> (+0.23%) ⬆️

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

Impacted Files Coverage Δ
pkg/agent/qrm-plugins/cpu/dynamicpolicy/policy.go 38.32% <0.00%> (-0.03%) ⬇️
...ourcemanager/fetcher/kubelet/topology/interface.go 0.00% <0.00%> (ø)
pkg/client/control/cnr.go 37.80% <0.00%> (-1.94%) ⬇️
pkg/util/general/error.go 0.00% <0.00%> (ø)
.../agent/resourcemanager/reporter/cnr/cnrreporter.go 61.20% <27.58%> (-3.06%) ⬇️
pkg/agent/resourcemanager/reporter/converter.go 33.33% <33.33%> (ø)
pkg/metaserver/agent/cnr/cnr_stub.go 60.00% <33.33%> (-40.00%) ⬇️
pkg/util/syntax/reflect.go 65.90% <40.00%> (-6.25%) ⬇️
pkg/agent/resourcemanager/reporter/manager.go 51.37% <53.57%> (-6.38%) ⬇️
...ger/fetcher/kubelet/topology/podresourcesserver.go 55.35% <56.43%> (-5.71%) ⬇️
... and 27 more

... and 9 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@luomingmeng luomingmeng force-pushed the dev/support_dynamic_headroom_policy branch 11 times, most recently from ce90d3c to 6b4dcd9 Compare May 11, 2023 05:08
@luomingmeng luomingmeng added workflow/need-review review: test succeeded, need to review and removed workflow/draft draft: no need to review labels May 11, 2023
@luomingmeng luomingmeng marked this pull request as ready for review May 11, 2023 05:56
@luomingmeng luomingmeng force-pushed the dev/support_dynamic_headroom_policy branch 2 times, most recently from c3ca424 to f17d1ac Compare May 11, 2023 12:21
}

func (p *PolicyAdaptive) Update() error {
regionInfo, ok := p.metaReader.GetRegionInfo(p.regionName)
Copy link
Collaborator

Choose a reason for hiding this comment

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

why we need to get region-info and judge with its type? should we just verify this logic when NewPolicyAdaptive is called? for dedicated_cores, can it still work since it will never update() with nil error at all?

@luomingmeng luomingmeng force-pushed the dev/support_dynamic_headroom_policy branch 2 times, most recently from 18616a4 to 3ae3eac Compare May 13, 2023 04:50
@luomingmeng luomingmeng force-pushed the dev/support_dynamic_headroom_policy branch from 3ae3eac to a7ef6d8 Compare May 14, 2023 09:34
@luomingmeng luomingmeng requested a review from sun-yuliang May 15, 2023 02:22
@luomingmeng luomingmeng changed the title support adaptive cpu headroom policy support utilization based canonical cpu headroom policy May 15, 2023
@luomingmeng luomingmeng added workflow/merge-ready merge-ready: code is ready and can be merged and removed workflow/need-review review: test succeeded, need to review labels May 16, 2023
@waynepeking348 waynepeking348 merged commit b857532 into kubewharf:main May 16, 2023
luomingmeng added a commit to luomingmeng/katalyst-core that referenced this pull request Oct 11, 2024
* support adaptive cpu headroom policy

* fix network policy register not import path

* rename sysadvisor RegisterHealthzCheckRules to RegisterAdvisorPlugin

* change policy name adaptive to utilization
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/merge-ready merge-ready: code is ready and can be merged
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

3 participants