Docs Menu

Docs HomeMongoDB Manual

balancerStart

On this page

  • Definition
  • Syntax
  • Example
balancerStart

Starts the balancer thread. The command does not wait for a balancing round to start.

Starting in MongoDB 6.1, automatic chunk splitting is not performed. This is because of balancing policy improvements. Auto-splitting commands still exist, but do not perform an operation. For details, see Balancing Policy Changes.

In MongoDB versions earlier than 6.1, the command enables auto-splitting for the sharded cluster. To disable auto-splitting when the balancer is enabled, you can use sh.disableAutoSplit()

You can only issue the balancerStart against the admin database on a mongos instance.

The command has the following syntax:

db.adminCommand(
{
balancerStart: 1,
maxTimeMS: <number>
}
)
Field
Type
Description
balancerStart
any
Any value.
maxTimeMS
integer

Optional. Time limit for enabling the balancer.

Defaults to 60000 milliseconds.

To start the balancer thread, connect to a mongos instance and issue the following command:

db.adminCommand( { balancerStart: 1 } )

Tip

See also:

←  balancerCollectionStatusbalancerStatus →
Give Feedback
© 2022 MongoDB, Inc.

About

  • Careers
  • Investor Relations
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2022 MongoDB, Inc.