When i checked prometheus custom metrics, i see container_memory_cache but container level memory buffer data is not available.. When i run vmstat -S M
command.. i can get buffered memory as below. But in kubernetes architecture, running this command on each pods will be wasting resources.. Is there any alternative way to get these datas for each pods?In addition to that, vmstat metrics also do not have buffered memory data too... Any idea? Thanks
vmstat -S M
procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
r b swpd free buff cache si so bi bo in cs us sy id wa st
3 0 0 456 2 19594 0 0 6 39 4 3 7 5 87 0 0
You can find a lot of information regarding container memory usage in cgroups, for example
/sys/fs/cgroup/memory/docker/{id}/memory.stat
Such files could be accessed from node OS and will provide you with all available information regarding container memory usage.
However, as far as I understand, buffered memory is not available inside containers to avoid double caching by node OS and container itself.