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: add memory.min param #211

Merged
merged 1 commit into from
Mar 1, 2022
Merged

Conversation

sergelogvinov
Copy link
Contributor

It helps to configure memory.min cgroup param to make hard memory protection to the process group.

memory.min exists on documentation https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html

Copy link
Contributor

@Zyqsempai Zyqsempai left a comment

Choose a reason for hiding this comment

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

@sergelogvinov Please add full support for this parameter including tests.

if mem := spec.Memory; mem != nil {

if len(memoryEvents) > 0 {

func TestSystemdCgroupMemoryController(t *testing.T) {

@dmcgowan dmcgowan added this to Needs Contributor Update in Code Review Dec 2, 2021
@sergelogvinov
Copy link
Contributor Author

sergelogvinov commented Dec 2, 2021

Thank you. I've add the test.

memory.events does not have min event...
crun memory controller cannot set hard memory reservation only soft (memory.low)

@dmcgowan dmcgowan moved this from Needs Contributor Update to Ready For Review in Code Review Feb 4, 2022
Copy link
Member

@kzys kzys left a comment

Choose a reason for hiding this comment

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

LGTM

It helps to configure memory.min cgroup parameter.

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
@sergelogvinov
Copy link
Contributor Author

Rebase and resolve conflicts

Copy link
Member

@estesp estesp left a comment

Choose a reason for hiding this comment

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

LGTM

@estesp estesp merged commit 2e502f6 into containerd:main Mar 1, 2022
Code Review automation moved this from Ready For Review to Done Mar 1, 2022
@sergelogvinov sergelogvinov deleted the memory-min branch March 2, 2022 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants