kubewharf / katalyst-core

Katalyst aims to provide a universal solution to help improve resource utilization and optimize the overall costs in the cloud. This is the core components in Katalyst system, including multiple agents and centralized components
Apache License 2.0
394 stars 91 forks source link

feat(eviction): add cpu system pressure eviction plugin #518

Open WangZzzhe opened 3 months ago

WangZzzhe commented 3 months ago

What type of PR is this?

Enhancements

What this PR does / why we need it:

Which issue(s) this PR fixes:

https://github.com/kubewharf/katalyst-core/issues/492 PR in katalyst-api: https://github.com/kubewharf/katalyst-api/pull/74 go.mod should be updated after api PR merged

codecov[bot] commented 3 months ago

Codecov Report

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

Project coverage is 56.26%. Comparing base (74b648c) to head (4db7acc). Report is 11 commits behind head on main.

Files Patch % Lines
...gent/evictionmanager/plugin/cpu/system_pressure.go 78.82% 43 Missing and 22 partials :warning:
...s/dynamic/adminqos/eviction/cpu_system_eviction.go 38.35% 45 Missing :warning:
pkg/util/native/pod_sorter.go 57.69% 8 Missing and 3 partials :warning:
pkg/agent/evictionmanager/plugin/memory/helper.go 0.00% 4 Missing :warning:
pkg/util/metric/ring.go 88.23% 2 Missing and 2 partials :warning:
...ynamicpolicy/cpueviction/strategy/pressure_load.go 75.00% 2 Missing :warning:
...options/dynamic/adminqos/eviction/eviction_base.go 66.66% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #518 +/- ## ========================================== + Coverage 56.06% 56.26% +0.19% ========================================== Files 534 538 +4 Lines 49807 50283 +476 ========================================== + Hits 27924 28290 +366 - Misses 18325 18412 +87 - Partials 3558 3581 +23 ``` | [Flag](https://app.codecov.io/gh/kubewharf/katalyst-core/pull/518/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kubewharf) | Coverage Δ | | |---|---|---| | [unittest](https://app.codecov.io/gh/kubewharf/katalyst-core/pull/518/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kubewharf) | `56.26% <71.05%> (+0.19%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kubewharf#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

waynepeking348 commented 2 months ago
  1. what's the difference between this eviction plugin and cpu-load && cpu-suppression eviction plugins?
  2. why don't we implement this eviction in qrm but in eviction-manager? will it be conflict with qrm hybrid logic?
WangZzzhe commented 2 months ago
  1. what's the difference between this eviction plugin and cpu-load && cpu-suppression eviction plugins?
  2. why don't we implement this eviction in qrm but in eviction-manager? will it be conflict with qrm hybrid logic?
  1. This eviction plugin is supposed to be used in non-colocation scenarios(eg. overcommit), detecting the load of node rather than resource pool and selecting evicted pods by native QoS.
  2. Qrm plugins will not be run when colocation is not applied in user's clusters, only eviction plugins will run based on metaServer. If colocation is applied, cpu-load and cpu-suppression will be used and this plugin should be disabled. @waynepeking348