Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-13524

Why MongoDB starts to split before 64MB?

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

      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@mongodb.com Ramon Fernandez Marina
            Reporter:
            maxime.fouilleul@gmail.com Maxime FOUILLEUL
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: