I have a stand-alone MongoDB instance running in windows. It's recently experiencing slowness and my troubleshooting has found the following symptoms.
- The slowness normally occurs after a full text search query against a huge collection. I guess this is because it swaps many pages in the collection from disk into memory hence data from other collections are squeezed out of memory.
- The server memory usage is capped around 55%. The server (Win2012) has 32GB of memory but MongoDB is not trying to utilize beyond 16GB.
I have seen a couple of Q&A in limiting MongoDB memory usage but not on how to encourage MongoDB to be more greedy.
Would anyone has experience with similar issue?
- MongoDB: 3.2.0
- Storage Engine: wiredTiger
- OS: Win2012
- Memory: 32GB
Thanks
Best Answer
Figured out why, here is the explanation.
wiredTiger has a default cache size limit of 60%RAM - 1GB, should be overwritten in a system with large memory.