I am using "MongoDB v4.2.x". My server memory is just 4GB, and MongoDB is utilizing more than 60%. I am running simple queries, not even aggregations, and the response time is too slow.
The question: How to reduce memory consumption and improve response time when querying a MongoDB database?
Ideas up to now:
- Is there a memory limitation option in MongoDB so that the parts of the loaded database that are not used may be outsourced to the disk? 
- Changing "wiredTiger" cache size up to 1GB, but response time stays very slow. Are there any other MongoDB tweaks? 
- Is there a workaround in Python instead of tweaking MongoDB itself? 
 
    