-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Description
Hi there!
According to the Linux kernel documentation:
Only anonymous and swap cache memory is listed as part of 'rss' stat.
This should not be confused with the true 'resident set size' or the
amount of physical memory used by the cgroup.
'rss + file_mapped" will give you resident set size of cgroup.
(Note: file and shmem may be shared among other cgroups. In that case,
file_mapped is accounted only when the memory cgroup is owner of page
cache.)
(The relevant field seems to actually be named mapped_file, not file_mapped.)
However, setMemoryStats does not expose the mapped_file stat, and there is no attribute for this in the MemoryStats type. If I understand correctly, this means that it is impossible to accurately calculate the resident set size of a cgroup based on the stats returned by cadvisor.
Please correct me if I'm wrong and there is a better way to do this. Otherwise, I'm happy to work on a PR if this is a desired feature.
meetme2meat
Metadata
Metadata
Assignees
Labels
No labels