openscap icon indicating copy to clipboard operation
openscap copied to clipboard

Consider cgroup when determining memory usage

Open 0intro opened this issue 2 years ago • 3 comments

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 avatar Jul 20 '23 11:07 0intro

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

evgenyz avatar Feb 09 '24 15:02 evgenyz

I've just rebased the change.

0intro avatar Mar 07 '24 20:03 0intro

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.

evgenyz avatar Mar 11 '24 23:03 evgenyz