Does the metric kubernetes.pod.memory.usage also counts cache/buffer usage?

Viewed 199

Trying to keep track of memory usage for a pod in k8s. Does the metric kubernetes.pod.memory.usage counts cached/buffer size? If yes, which metric should I use to keep track of actual memory usage

1 Answers
  1. Does the metric kubernetes.pod.memory.usage counts cached/buffer size? The answer is Yes.

enter image description here

  1. Which metric should I use to keep track of actual memory usage? container_memory_working_set_bytes

The article is recommended to you:

You might think that memory utilization is easily tracked with container_memory_usage_bytes, however, this metric also includes cached (think filesystem cache) items that can be evicted under memory pressure.The better metric is container_memory_working_set_bytes as this is what the OOM killer is watching for.

Related