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
389 stars 91 forks source link

feat: adding support to qos level memory.low protection #635

Open lubinszARM opened 1 week ago

lubinszARM commented 1 week ago

What type of PR is this?

Features

What this PR does / why we need it:

It provides a gradient of file-memory protection for high qos tasks under kswapd memory pressure.

Which issue(s) this PR fixes:

Optimize stability under heavy thrashing (hot memory exhaustion) scenarios

Special notes for your reviewer:

None

codecov[bot] commented 1 week ago

Codecov Report

Attention: Patch coverage is 60.34483% with 69 lines in your changes missing coverage. Please review.

Project coverage is 56.85%. Comparing base (4858a44) to head (d0c7a14).

Files Patch % Lines
...mory/handlers/memprotection/memprotection_linux.go 49.50% 42 Missing and 9 partials :warning:
...g/agent/qrm-plugins/memory/dynamicpolicy/policy.go 14.28% 5 Missing and 1 partial :warning:
...md/katalyst-agent/app/options/qrm/memory_plugin.go 60.00% 4 Missing :warning:
pkg/util/cgroup/manager/v1/fs_linux.go 84.61% 2 Missing and 2 partials :warning:
pkg/util/cgroup/manager/v2/fs_linux.go 84.61% 2 Missing and 2 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #635 +/- ## ========================================== + Coverage 56.75% 56.85% +0.10% ========================================== Files 545 546 +1 Lines 51537 51711 +174 ========================================== + Hits 29248 29399 +151 - Misses 18583 18592 +9 - Partials 3706 3720 +14 ``` | [Flag](https://app.codecov.io/gh/kubewharf/katalyst-core/pull/635/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/635/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kubewharf) | `56.85% <60.34%> (+0.10%)` | :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.

lubinszARM commented 1 week ago

cc @zikerHe @cheney-lin