Why MongoDB starts to split before 64MB?

XMLWordPrintableJSON

    • Type: Question
    • Resolution: Done
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Sharding
    • Environment:
      MongoDB 2.4 and MongoDB 2.6
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      I'm testing the MongoDB Sharding with a Sharded Collection and a forloop to insert arround some documents to see how splitting and moving works.

      After 10K documents MongoDB has split my collection in 3 chunks, well before 64Mb (the default chunkSize):

      mongos> db.users.getShardDistribution()

      Shard rs0 at rs0/mongod00.local.net:2100,mongod01.local.net:2101
      data : 1.06MiB docs : 10000 chunks : 3
      estimated data per chunk : 364KiB
      estimated docs per chunk : 3333

      Totals
      data : 1.06MiB docs : 10000 chunks : 3
      Shard rs0 contains 100% data, 100% docs in cluster, avg obj size on shard : 112B

      It's not a problem but with this, I don't understant the interest of the chunkSize parameter.

            Assignee:
            Ramon Fernandez Marina
            Reporter:
            Maxime FOUILLEUL
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: