Pradipta
Hi Pradipta
Your description seems to point to the lack of RAM in your deployment. Unfortunately there is no easy answer to “how much RAM do I need for my deployment”, since it depends entirely on your use case, with (usually) little correlation to your data size.
For example, two deployments having the same data size could have entirely different access pattern. Deployment 1 may access a small portion of the data, which means that less RAM is required to maintain performance. However, Deployment 2 may require access to almost all of the data, thus requiring a much larger RAM.
This is not the whole story, however. How well your queries are indexed could also impact your RAM usage. For example, if your queries are doing collection scans all the time, this would require MongoDB to load much more data into RAM vs. a properly indexed queries.
You may be able to find some guidance under Production notes and Analyze Query Performance.
Best regards,
Kevin