Pod and standalone Container consume different memory

I was trying to monitor memory consumption of a Spring Based microservice.
I built the image using amazon-corretto:8-alpine-jre image.

I then monitored the pod memory consumption using Prometheus-Grafana.
Also, I started a separate container with the image and monitored it using Google cAdvisor.

I applied load through Jmeter script with 200threads for 500 iterations

To my surprise the memory consumption values are miles apart.

Pod Memory Consumption: 245MB (Peak during the test).

Container Memory Consumption: ~550MB (During the test).

I’m not sure how this is possible. I would appreciate any help. Thank You

Source: Docker Questions

LEAVE A COMMENT