Kubernetes pods in Grafana dashboard show memory usage with Current, Requested, Limit and Cache. What does Cache indicate?

4/14/2020

In grafana dashboard, I see the memory request(2GB) and limit(4GB) lines. The current base which I think is the current usage consumption looks steady near the 0gb. I see also another line which is the cache and is rising up (from near zero to 4GB) and it gets clipped from there. What does the Cache line indicate? The pod is still running (not getting killed).

enter image description here

-- alltej
docker
grafana
kubernetes

1 Answer

4/14/2020

Its page cache.Under Linux, the Page Cache accelerates many accesses to files on non volatile storage. This happens because, when it first reads from or writes to data media like hard drives, Linux also stores data in unused areas of memory, which acts as a cache. If this data is read again later, it can be quickly read from this cache in memory

If you run free -m command the buff/cache column is what indicates page cache.

root@kind-control-plane:/# free -m
              total        used        free      shared  buff/cache   available
Mem:           1989         918          73           5         997         995

Swap:          1023         134
-- Arghya Sadhu
Source: StackOverflow