When you have multiple services running in docker container it's quite possible that you have an issues with certain services when your docker container runs out of memory. MongoDB is one such service.
On docker container when you have MongoDB running and when it starts storing huge data it starts consuming lots of memory and that's where you have an issue. MongoDB will crash after sometime where isn't much memory left.
The reason behind this is the IO model of MongoDB, it tries to keep as much data as possible in cache so read and write operations are much faster. But this creates an issue with docker as we have limited memory and lots of services are sharing that.
Starting from MongoDB 3.2 on words WiredTiger storage engine is the default one for MongoDB and it's recommended.
There are various advantages of WiredTiger storage engine. For example,
- Document Level Concurrency
- Snapshots and Checkpoints
- Journal
- Compression
- Memory Use
No comments:
Post a Comment