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: adding support to qos level memory.low protection #635

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

lubinszARM
Copy link
Contributor

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

@lubinszARM lubinszARM force-pushed the pr_mem_protection_qos branch 5 times, most recently from 32f2163 to d0c7a14 Compare June 24, 2024 10:01
Copy link

codecov bot commented Jun 24, 2024

Codecov Report

Attention: Patch coverage is 55.85106% with 83 lines in your changes missing coverage. Please review.

Project coverage is 56.92%. Comparing base (ee1cc39) to head (47a0e4a).
Report is 4 commits behind head on main.

Files Patch % Lines
...qrm-plugins/memory/handlers/memlow/memlow_linux.go 52.47% 40 Missing and 8 partials ⚠️
pkg/util/cgroup/manager/v1/fs_linux.go 34.48% 19 Missing ⚠️
...g/agent/qrm-plugins/memory/dynamicpolicy/policy.go 14.28% 6 Missing ⚠️
...md/katalyst-agent/app/options/qrm/memory_plugin.go 60.00% 4 Missing ⚠️
pkg/util/cgroup/manager/cgroup.go 66.66% 1 Missing and 1 partial ⚠️
pkg/util/cgroup/manager/fake_manager.go 0.00% 2 Missing ⚠️
pkg/util/cgroup/manager/v2/fs_linux.go 93.10% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #635      +/-   ##
==========================================
- Coverage   56.96%   56.92%   -0.05%     
==========================================
  Files         553      554       +1     
  Lines       53161    53353     +192     
==========================================
+ Hits        30284    30372      +88     
- Misses      19073    19179     +106     
+ Partials     3804     3802       -2     
Flag Coverage Δ
unittest 56.92% <55.85%> (-0.05%) ⬇️

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.

@lubinszARM
Copy link
Contributor Author

cc @zikerHe @cheney-lin

@lubinszARM lubinszARM force-pushed the pr_mem_protection_qos branch 6 times, most recently from 88b69d6 to b2642dd Compare July 17, 2024 09:02
@lubinszARM lubinszARM force-pushed the pr_mem_protection_qos branch 3 times, most recently from 77b657b to 5117199 Compare July 25, 2024 10:30
@lubinszARM lubinszARM force-pushed the pr_mem_protection_qos branch 3 times, most recently from c5b0cce to 046a65e Compare July 25, 2024 15:51
This patch provied the feature of memory.low protection.
There are a couple of benefits about memory.low protection:

1, it provides a gradient of protection.
 As a cgroup's usage grows past the protected amount,
 the protected amount remains protected,
 but reclaim pressure for the excess amount gradually increases.
2, it's work-conserving - if the protected cgroup doesn't use the memory,
 it's available for others to use.

Signed-off-by: Robin Lu <[email protected]>
@lubinszARM lubinszARM force-pushed the pr_mem_protection_qos branch from 046a65e to 47a0e4a Compare July 29, 2024 02:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant