[SERVER-28404]  Database Server has a lot of free ram but doen't use it Created: 21/Mar/17  Updated: 31/May/17  Resolved: 21/Mar/17

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Question Priority: Major - P3
Reporter: Tobias S. Keller Assignee: Mark Agarunov
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

We are running several aws ec2 servers with ubuntu 16.04 and mongodb that have all 2GB of ram, but the database does not use more than around 1GB even though the database itself is growing and growing in size.
also it seems that some process makes the kswapd0 process going nuts trying to swap.

Is there any hidden setting that limits mongodb in the amount of ram it is allowed to use?



 Comments   
Comment by Mark Agarunov [ 21/Mar/17 ]

Hello blinkit-tobi,

Thank you for the report. Assuming you are using the WiredTiger storage engine, the default memory usage is 50% of RAM minus 1 GB, or 256MB, whichever is larger. This can be changed by setting the storage.wiredTiger.engineConfig.cacheSizeGB parameter in the configuration.

Please note that SERVER project is for reporting bugs or feature suggestions for the MongoDB server. For MongoDB-related support discussion please post on the mongodb-user group or Stack Overflow with the mongodb tag. A question like this involving more discussion would be best posted on the mongodb-user group.

Thanks,
Mark

Generated at Thu Feb 08 04:18:02 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.