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

FAQ entry for shard balancer prioritizing of chunk migrations and draining

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Blocker - P1
    • Resolution: Done
    • None
    • mongodb-2.2
    • manual
    • None
    • docs-sprint-0

    Description

      Scenario:

      A sharded system has uneven chunk distribution. The user removes a shard (setting it to drain) and adds new shards. The balancer prioritizes moving chunks to reach equilibrium before draining the removed shard. This priority is not configurable.

      Two alternative solutions:

      • Stop the balancer. Write a script to manually move chunks off of the draining shard (using the moveChunk command). Restart the balancer.
      • Set the maxSize on the new shards to some low value so they cannot accept more chunks, which should stop the balancing operation and allow draining to continue (with chunks likely moved to the full shards). Restore the original maxSize value afterwards. When changing maxSize in the config database, you probably need to run the flushRouterConfig command to refresh mongos. Versions of mongos prior to 2.0 won't support this, so you'd need to restart mongos.

      Attachments

        Activity

          People

            kay.kim@mongodb.com Kay Kim (Inactive)
            jmikola@mongodb.com Jeremy Mikola
            Jess Mokrzecki Jess Mokrzecki
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              10 years, 32 weeks, 4 days ago