2

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.

1 Answer 1

1

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.

4
  • Many thanks for the answer. May I ask how you know? Is this mentioned in any available documentation?
    – MarcF
    Sep 11, 2017 at 16:24
  • I know how sharding and chunk balancing works.
    – JJussi
    Sep 12, 2017 at 3:40
  • I know because I know, good enough :p Many thanks for the answer, have accepted.
    – MarcF
    Sep 12, 2017 at 9:33
  • For reference I found a great internal wiki that answer some other general questions I had about mongo - github.com/mongodb/mongo/wiki/Sharding-Internals
    – MarcF
    Sep 13, 2017 at 14:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.