Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-3529

Comment on: "manual/core/sharding-balancing.txt"

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • v1.3.6
    • None
    • manual

    Description

      From the migration thresholds list:

      fewer than 20 = 2
      21 - 80 = 4

      What about 20 chunks exactly? It is not included in that list. For reference, I tested with 20 chunks exactly and the balancer reports the threshold as 4.

      Test set up and loglevel 1 output:

      sh.status()
      --- Sharding Status --- 
        sharding version: {
      	"_id" : 1,
      	"version" : 4,
      	"minCompatibleVersion" : 4,
      	"currentVersion" : 5,
      	"clusterId" : ObjectId("538dabe1080df1beec495236")
      }
        shards:
      	{  "_id" : "shard0000",  "host" : "localhost:30000" }
      	{  "_id" : "shard0001",  "host" : "localhost:30001" }
      	{  "_id" : "shard0002",  "host" : "localhost:30002" }
        databases:
      	{  "_id" : "admin",  "partitioned" : false,  "primary" : "config" }
      	{  "_id" : "balanceTest",  "partitioned" : true,  "primary" : "shard0001" }
      		balanceTest.foo
      			shard key: { "_id" : 1 }
      			chunks:
      				shard0001	5
      				shard0000	8
      				shard0002	7
      			too many chunks to print, use verbose if you want to force print
       
      m30999| 2014-06-03T12:29:44.771+0100 [Balancer] shard0002 has more chunks me:7 best: shard0001:5
       m30999| 2014-06-03T12:29:44.771+0100 [Balancer] collection : balanceTest.foo
       m30999| 2014-06-03T12:29:44.771+0100 [Balancer] donor      : shard0000 chunks on 8
       m30999| 2014-06-03T12:29:44.771+0100 [Balancer] receiver   : shard0001 chunks on 5
       m30999| 2014-06-03T12:29:44.771+0100 [Balancer] threshold  : 4
       m30999| 2014-06-03T12:29:44.771+0100 [Balancer] no need to move any chunk
       m30999| 2014-06-03T12:29:44.771+0100 [Balancer] *** end of balancing round

      Attachments

        Activity

          People

            kay.kim@mongodb.com Kay Kim (Inactive)
            adamc Adam Comerford
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              9 years, 37 weeks ago