top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to Limit memory usage in MongoDB?

+1 vote
528 views

We are using mongo DB in a single node. I understand that this is not MongoDB is intended to do. But due to the sophistication of mongos querying and other architectural/ business reasons we have chosen MongoDB. We are facing an issue now. We would be happy to get it resolved with your help.

Problem:
We have to limit the memory utilization of MongoDB.

ENV:
WindowsVersion: 3.2

What we know:
1. MongoDB utilizes as much memory as possible to give a better performance
2. When memory utilization reaches a certain threshold percentage, MongoDB frees up the memory it holds
3. We are not able to see the memory utilization of MongoDB service in Task Manager

posted Jun 5, 2017 by Ankit

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
+2 votes

Is there a way to configure/increase the memory limit(100MB) on the pipeline? What if I have a lot of RAM that can be used by MongoDB?

+2 votes

Please tell me how can we resolve this issue, we are using aggregation and size of docs become greater than 16MB. We also tried "ALLOWDISKUSE = TRUE" but still its throwing same error.

We are using php to fetch data greater than 16MB. Let me know if you needed more info.

0 votes

I have problem with mongods high cpu usage. We get 3000 data per second, and I insert it per 100,000.(insert with c++ driver, using vector)

I expect even progress of cpu, but I intermittently found high cpu of mongod. Although there is no result of currentOp() command. Why cpu status shows like below?

Insert amount of 459~742 second is not bigger than before, but mongods cpu usage is much bigger.

What can be cause of this status?

+2 votes

We are seeing some issues with iowait. On a machine with 16 cores and 60 GB memory and SSD (max IO around 250 mb/s) (virtual machine on google) we see around constantly 20% iowait on top and iotop shows its the mongoDB process. Only around 10MB/s are actually read from the disk and as I said, we know from other tests that the machine can do much much more.

The query producing this pattern sorts a result from a query by an attribute (all indexed). After running queries like this a few times it works better. The total index size is around 4GB, so I assume it gets loaded in memory directly.

Is there any suggestions on how to debug this? I cant see how there can be such a high iowait when all computing resources are not even barely utilized.

Note: Running MongoDB 3.0.10 on Ubuntu 14.04

...