MongoDB Documentation, Release 3.0.4 Note: The specification of the balancing window is relative to the local time zone of all individual mongos instances in the cluster. Manage Sharded Cluster Balancer (page 715). To minimize the impact of balancing on the cluster, the balancer will not begin balancing until the distribution of chunks for a sharded collection has reached certain thresholds. The thresholds apply to the difference in number of chunks between the shard with the most chunks for the collection and the shard with the fewest chunks for that collection. The balancer has the following thresholds: Changed in version 2.2: The following thresholds appear first in 2.2. Prior to this release, a balancing round would only start if the shard with the most chunks had 8 more chunks than the shard with the least number of chunks. Once a balancing round starts, the balancer will not stop until, for the collection, the difference between the number of chunks on any two shards for that collection is less than two or a chunk migration fails. By default, MongoDB will attempt to fill all available disk space with data on every shard as the data set grows. To ensure that the cluster always has the capacity to handle data growth, monitor disk usage as well as other performance metrics. When adding a shard, you may set a “maximum size” for that shard. This prevents the balancer from migrating chunks to the shard when the value of mapped exceeds the “maximum size”. Use the maxSize parameter of the addShard command to set the “maximum size” for the shard. Change the Maximum Storage Size for a Given Shard (page 713) and Monitoring for MongoDB (page 187). Chunk migration moves the chunks of a sharded collection from one shard to another and is part of the balancer (page 684) process. MongoDB migrates chunks in a sharded cluster to distribute the chunks of a sharded collection evenly among shards. Migrations may be either: • Manual. Only use manual migration in limited cases, such as to distribute data during bulk inserts. See Migrating Chunks Manually (page 724) for more details. • Automatic. The balancer (page 684) process automatically migrates chunks when there is an uneven distribution of a sharded collection’s chunks across the shards. See Migration Thresholds (page 685) for more details. Chunk Migration Across Shards See also: Chunk Migration 685 10.2. Sharding Concepts Shard Size Migration Thresholds See also: Number of Chunks Migration Threshold Fewer than 20 2 20-79 4 80 and greater 8