2

First up all my knowledge in this area is limited. So please bear with me.

I have one MongoDb pod running in Kubernetes cluster. I got inside the pod using kubectl exec command and running top command. I can see that MongoDb is using 1.4 Gb RAM but total memory usage is more than 10 Gb. See the screenshots below.

top command

ps command

So my first question is whether the total memory usage shown in the above screenshot is against that node or pod because in that pod only MongoDb is running

Then based on another recommendation mentioned in Checking kubernetes pod CPU and memory I have executed below command

cd /sys/fs/cgroup/memory cat memory.usage_in_bytes

Here I can see that almost 13 Gb is used by this pod. But I know that only MongoDb process is running in this pod, so I am not sure which process is taking this much memory. See the screenshot below

cgroup command

I also ran the command in Mongo shell to see the memory usage but its only 1.4 GB

mongo shell

So in this pod which process is taking memory? 13 Gb RAM is being used but only 1.4 Gb is used by MongoDb. Is there any way we can identify which process is taking this much memory?

Please help. Thank you

0 Answers0