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

Consider cgroup when determining memory usage #2006

Open
wants to merge 1 commit into
base: maint-1.3
Choose a base branch
from

Conversation

0intro
Copy link
Contributor

@0intro 0intro commented Jul 20, 2023

This change modifies the oscap_sys_memusage function to take into account the memory constraints of the cgroup. Both cgroup and cgroup2 are supported.

@evgenyz
Copy link
Contributor

evgenyz commented Feb 9, 2024

Hey, @0intro! Can you please rebase the PR?

This change modifies the oscap_sys_memusage function
to take into account the memory constraints of the
cgroup. Both cgroup and cgroup2 are supported.
@0intro
Copy link
Contributor Author

0intro commented Mar 7, 2024

I've just rebased the change.

@evgenyz
Copy link
Contributor

evgenyz commented Mar 11, 2024

Okay, I understand the change, and I'm not particularly against it. But it will affect every invocation of the scanner everywhere as the scanner has a default memory limit for all operations. What we have right now could be not exactly correct, but it might be what is expected by the users however weird it is.

And we don't really have a test even for the old behavior. How about you add a test that checks your particular use-case (the problem you're trying to solve)? We can then reason about preferred strategies on the new behavior.

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.

2 participants