MongoDB Initial Sync & Sharding/Balancing timings – The influencing factors

 

The following factors influence the Initial sync & sharding timings i.e.,

the initial sync between primary and secondary for a replica set or
the initial sharding/balancing for a sharded cluster

1. Document size
2. No. of documents/collections
3. No. of chunks & their size
4. Document type ( text, image & video . etc)
5. N/W bandwidth
6. Number of Indices & Shard key
7. Size of RAM relative to working set & index sizes
8. Disk I/O performance

To learn more about initial sync read:
http://docs.mongodb.org/manual/core/replica-set-sync/
In addition to the factors above, the number of indexes to be built will impact initial sync time as well.
You can speed up the initial sync by seeding a secondary from another replica set member:
http://docs.mongodb.org/manual/tutorial/resync-replica-set-member/#sync-by-copying-data-files-from-another-member
To learn more about the mechanics of balancing a sharded cluster, read:
http://docs.mongodb.org/manual/core/sharding-balancing/
In addition to the factors listed above the shard key, chunk size and balancing thresholds can influence sharding/balancing performance:
http://docs.mongodb.org/manual/core/sharding-chunk-splitting/#chunk-size
http://docs.mongodb.org/manual/core/sharding-balancing/#migration-thresholds
In certain circumstances you can pre-split chunk ranges to improve initial document distribution:
http://docs.mongodb.org/manual/tutorial/split-chunks-in-sharded-cluster/
For sharding/scaling performance in general see the sections on “Scaling a MongoDB System” & “Shard Balancing” in the MongoDB Operations Best Practices:
http://info.mongodb.com/rs/mongodb/images/10gen-MongoDB_Operations_Best_Practices.pdf

  • Ask Question