-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74985/#review226436
-----------------------------------------------------------




src/slave/containerizer/mesos/isolators/cgroups2/controllers/memory.cpp
Lines 196 (patched)
<https://reviews.apache.org/r/74985/#comment314643>

    maybe a TODO here to report more stats, since there appears to be lots more 
available in the stat file?



src/slave/containerizer/mesos/isolators/cgroups2/controllers/memory.cpp
Lines 198-202 (patched)
<https://reviews.apache.org/r/74985/#comment314638>

    why is this user? this looks like total memory consumption of the container?



src/slave/containerizer/mesos/isolators/cgroups2/controllers/memory.cpp
Lines 206 (patched)
<https://reviews.apache.org/r/74985/#comment314640>

    Move this down to where set set kernel memory?



src/slave/containerizer/mesos/isolators/cgroups2/controllers/memory.cpp
Lines 219 (patched)
<https://reviews.apache.org/r/74985/#comment314642>

    looks good but let's update the docs on this field in the v1 and non-v1 
mesos.proto files to better explain what cache represents



src/slave/containerizer/mesos/isolators/cgroups2/controllers/memory.cpp
Lines 229-236 (patched)
<https://reviews.apache.org/r/74985/#comment314641>

    Looks like this should be coming from memory.stat's unevictable stat 
instead?


- Benjamin Mahler


On May 13, 2024, 7:27 p.m., Jason Zhou wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74985/
> -----------------------------------------------------------
> 
> (Updated May 13, 2024, 7:27 p.m.)
> 
> 
> Review request for mesos and Benjamin Mahler.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Introduces `::usage` to the MemoryControllerProcess to report the total
> memory usage of a cgroup as well as memory usage statistics provided
> by `cgroups2::memory:stats`.
> 
> Patch also fixes the failures on mesos::internal::tests::MemoryIsolatorTest 
> when running on a CentOS 9 system with cGroupsV2 configured.
> 
> For the mesos::internal::slave::MemorySubsystemProcess::usage function, the 
> mapping reflects the stats reported in the v1 usage function, with the 
> exception of swap memory as we disable the cgroups_limit_swap flag in v2
> 
> Attributes used in in usage reporting:
> 
> set_mem_total_bytes: memory.usage_in_bytes in v1, memory.current in v2 - 
> current usage for memory
> set_mem_kmem_usage_bytes: memory.kmem.usage_in_bytes in v1, 
> memory.stat.kernel in v2 - Amount of total kernel memory
> set_mem_kmem_tcp_usage_bytes: memory.kmem.tcp.usage_in_bytes in v1, 
> memory.stat.sock in v2 - Amount of memory used in network transmission buffers
> set_mem_file_bytes: memory.stat.total_cache in v1, memory.stat.file in v2 - 
> Amount of memory used to cache filesystem data
> set_mem_cache_bytes: memory.stat.total_cache in v1, memory.stat.file in v2 - 
> Amount of memory used to cache filesystem data
> set_mem_anon_bytes: memory.stat.total_rss in v1, memory.stat.anon in v2 - 
> Amount of memory used in anonymous mappings
> set_mem_rss_bytes: memory.stat.total_rss in v1, memory.stat.anon in v2 - 
> Amount of memory used in anonymous mappings
> set_mem_mapped_file_bytes: memory.stat.total_mapped_file in v1, 
> memory.stat.file_mapped in v2 - Amount of cached filesystem data
> set_mem_unevictable_bytes: memory.stat.total_unevictable in v1, memory.min in 
> v2 - Hard memory protection. If the memory usage of a cgroup is within its 
> effective min boundary, the cgroup’s memory won’t be reclaimed under any 
> conditions
> 
> Docs referenced: 
> https://docs.kernel.org/admin-guide/cgroup-v1/memory.html#benefits-and-purpose-of-the-memory-controller
> https://docs.kernel.org/admin-guide/cgroup-v2.html#memory
> https://stackoverflow.com/questions/74796436/rss-memory-equivalent-in-cgroup-v2
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/mesos/isolators/cgroups2/controllers/memory.hpp 
> 2e60b2c19a781c2d8ab24e89e440383ca517868c 
>   src/slave/containerizer/mesos/isolators/cgroups2/controllers/memory.cpp 
> 732b1c65febdc78d8854e571bb02a9d367528434 
>   src/tests/containerizer/memory_isolator_tests.cpp 
> ec0f359a253ebaf8d7937876ba6f265d93d45ddd 
>   src/tests/mesos.cpp 762200cda73e3e1cda0755c44f4fffc974f0927b 
> 
> 
> Diff: https://reviews.apache.org/r/74985/diff/1/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Jason Zhou
> 
>

Reply via email to