Can you turn off MongoDB caching?

Can you turn off MongoDB caching? We use Redis to store active data. We plan to use redis for the normal storage of this data during its use. One of the sources that pass data to redis is the mongodb instance.

Since we use redis to store data in memory, can we disable the mongos caching features?

Thanks!

+4
source share
1 answer

MongoDB uses memory I / O, which means that the OS caches data, not the database, and it is not possible to disable this caching.

The OS typically uses the least recently used algorithm to remove the cache if memory is required, so if you do not request old data from MongoDB, these pages will be freed, which means that this will not really hurt Redis.

+8
source

All Articles