Memory usage on a mongodb 6.0.4 standalone instance

We are testing Mongodb 6.0.4 community edition in our Kubernetes environment. We have ruled out the use of the mongodb-kubernetes-operator till it is GA.

We have a 90GB collection and are noticing that a standalone instance uses 14-16 GB of memory. There are three indexes and we are not running many queries against it currently, yet we see 14-16GB of memory usage.

We intentionally did not apply resource limits to the mongodb statefulset to determine how it responds and are using mongodb out of the box without any tuning or additional parameters.

We are also using the official mongo:6.0 image.

Is this memory usage normal ?

did you check

Thanks for the link. Yes, we did look at that.

What we are observing is that mongo is respecting the Kubernetes limits when we put one in place. So for a 16GB limit, it is using the 50% of (RAM - 1 GB) limit while running, which is great.

On mongo 2.6.12 with the same collection, we were only using 1GB without any limits in place. We also understand that the comparison is between two different database engines but the question I’m being asked is why is there such a big discrepancy. Which is why the question was raised to begin with.

I guess we will have to try reducing the limit further to see how far we can go without degrading performance.