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

refactor(sysadvisor): support dynamic enable memory guard #536

Merged
merged 2 commits into from
Apr 15, 2024

Conversation

cheney-lin
Copy link
Member

What type of PR is this?

Enhancements

What this PR does / why we need it:

Which issue(s) this PR fixes:

Special notes for your reviewer:

@cheney-lin cheney-lin force-pushed the dev/mem_guard branch 2 times, most recently from 5e5fb3f to 18d5194 Compare April 9, 2024 11:09
@cheney-lin cheney-lin changed the title Dev/mem guard refactor(sysadvisor): support dynamic enable memory guard Apr 9, 2024
@cheney-lin cheney-lin self-assigned this Apr 10, 2024
@cheney-lin cheney-lin added enhancement New feature or request workflow/need-review review: test succeeded, need to review labels Apr 10, 2024
nightmeng
nightmeng previously approved these changes Apr 12, 2024
sun-yuliang
sun-yuliang previously approved these changes Apr 12, 2024
@waynepeking348 waynepeking348 dismissed stale reviews from sun-yuliang and nightmeng via a4c60d7 April 14, 2024 07:16
waynepeking348
waynepeking348 previously approved these changes Apr 15, 2024
@cheney-lin cheney-lin dismissed waynepeking348’s stale review April 15, 2024 07:59

The merge-base changed after approval.

waynepeking348
waynepeking348 previously approved these changes Apr 15, 2024
@cheney-lin cheney-lin dismissed waynepeking348’s stale review April 15, 2024 08:11

The merge-base changed after approval.

nightmeng
nightmeng previously approved these changes Apr 15, 2024
@cheney-lin cheney-lin dismissed nightmeng’s stale review April 15, 2024 08:21

The merge-base changed after approval.

The current memory protection mechanism is achieved by setting the memory limit
of the Besteffort group to avoid memory overflows. However, when calculating the limit,
the cache of high-priority services is considered as reclaimable,
so that direct memory reclamation can still be triggered when memory bursting.
This MR refactors the calculation logic. Firstly, we calculates the safety memory upper limit
for each available NUMA node, and then sums them up to obtain the result.
The upper limit for each NUMA node is calculated as followed: NUMA free memory + Besteffort group memory used on the NUMA node - reserved memory.

Signed-off-by: linzhecheng <linzhecheng@bytedance.com>
Signed-off-by: linzhecheng <linzhecheng@bytedance.com>
@nightmeng nightmeng merged commit 40d6b81 into kubewharf:main Apr 15, 2024
9 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.

4 participants