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

Why MongoDB starts to split before 64MB?

    XMLWordPrintable

    Details

    • Type: Question
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Works as Designed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Sharding
    • Environment:
      MongoDB 2.4 and MongoDB 2.6

      Description

      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.

        Attachments

          Activity

            People

            Assignee:
            ramon.fernandez Ramon Fernandez Marina
            Reporter:
            maxime.fouilleul@gmail.com Maxime FOUILLEUL
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: