Kubernetes Pod reporting more memory usage than actual process consumption Kubernetes Pod reporting more memory usage than actual process consumption kubernetes kubernetes

Kubernetes Pod reporting more memory usage than actual process consumption


In Linux unused memory considered as wasted memory, that's why all "free" RAM i. e. memory not used by application or kernel itself is actively used for caching IO operations, file system metadata, etc. but would be provided to your application if required.

You can get detailed information about your container memory consumption in here:

/sys/fs/cgroup/memory/docker/{id}/memory.stat

If you want to scale your cluster based on memory usage it is better to count only your application size, not container memory usage.


In case anyone ended up here, see this question for more on the differences using kubectl top versus running top or free inside a container:Checking kubernetes pod CPU and memory