Mongodb – Mongo memory usage vs shard chunk size

mongodb

Given the available documentation here:

https://docs.mongodb.com/manual/tutorial/modify-chunk-size-in-sharded-cluster/

There is no mention of the potential impact of memory (RAM) usage by changing the default chunk size. I am aware that MySQL (and other databases) always read rows into memory as pages if at least one is required, and wondered if a similar thing might happen in mongo?

If anyone could help shed some light on any possible relationship between chunk size and memory usage that would be greatly appreciated.

Best Answer

There is no relation between those. Chunk size is just partition size in the storage. When you read data from chunk, you read just those documents to the memory, what your query requires.