You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue causes missing a visible amount memory not counted in Usage (e.g. kernel memory) and is misleading. I propose using the value from /proc/meminfo to get the total memory usage for root stat.
Steps to reproduce the issue
run a kubelet
curl localhost:10255/stats/summary to check the root stats
stats got from step 2 do not match the system memory usage
Describe the results you received and expected
root stats' usageBytes should match system memory usage
For now, we use /proc/meminfo to calculate the swap info, and memory.stat to calculate the usage info. I think this may be strange. Perhaps we should calculate the memory info for the same place
Description
From the comments in https://github.com/opencontainers/runc/blob/main/libcontainer/cgroups/fs2/memory.go#L218, it appears the root stats of cgroup v2 was collected in a way to be similar to how v1 is implemented. My understanding, root stats v2 should be collected as memory.current in non-root cgroups, which is supposed to be total memory as opposed to just anon + file.
This issue causes missing a visible amount memory not counted in Usage (e.g. kernel memory) and is misleading. I propose using the value from /proc/meminfo to get the total memory usage for root stat.
Steps to reproduce the issue
Describe the results you received and expected
root stats'
usageBytes
should match system memory usageWhat version of runc are you using?
runc version 1.1.7
commit: a916309
spec: 1.0.2-dev
go: go1.20.5
libseccomp: 2.5.4
Host OS information
No response
Host kernel information
No response
The text was updated successfully, but these errors were encountered: