MongoDB Documentation, Release 3.0.4 db.settings.update( { _id: "balancer" }, { $set: { activeWindow : { start: "23:00", stop: "6:00" } } }, { upsert: true } ) Note: The balancer window must be sufficient to complete the migration of all data inserted during the day. As data insert rates can change based on activity and usage patterns, it is important to ensure that the balancing window you select will be sufficient to support the needs of your deployment. Do not use the sh.startBalancer() method when you have set an activeWindow . If you have set the balancing window (page 716) and wish to remove the schedule so that the balancer is always running, issue the following sequence of operations: By default the balancer may run at any time and only moves chunks as needed. To disable the balancer for a short period of time and prevent all migration, use the following procedure: Remove a Balancing Window Schedule use config db.settings.update({ _id : "balancer" }, { $unset : { activeWindow : true } }) Disable the Balancer 1. Connect to any mongos in the cluster using the mongo shell. 2. Issue the following operation to disable the balancer: sh.stopBalancer() If a migration is in progress, the system will complete the in-progress migration before stopping. 3. To verify that the balancer will not start, issue the following command, which returns false if the balancer is disabled: sh.getBalancerState() use config while ( sh.isBalancerRunning() ) { print("waiting..."); sleep(1000); } Optionally, to verify no migrations are in progress after disabling, issue the following operation in the mongo shell: Note: To disable the balancer from a driver that does not have the sh.stopBalancer() or sh.setBalancerState() helpers, issue the following command from the config database: db.settings.update( { _id: "balancer" }, { $set : { stopped: true } } , { upsert: true } ) 717 10.3. Sharded Cluster Tutorials