> For the complete MongoDB documentation index, see www.mongodb.com/docs/llms.txt

# Manage Sharded Cluster Balancer

This page describes common administrative procedures related to balancing. For an introduction to balancing, see [Sharded Cluster Balancer](https://www.mongodb.com/docs/manual/core/sharding-balancer-administration.md#std-label-sharding-balancing). For lower level information on balancing, see [Balancer Internals.](https://www.mongodb.com/docs/manual/core/sharding-balancer-administration.md#std-label-sharding-balancing-internals)

The balancer process has moved from the [`mongos`](https://www.mongodb.com/docs/manual/reference/program/mongos.md#mongodb-binary-bin.mongos) instances to the primary member of the config server replica set.

## Check the Balancer State

[`sh.getBalancerState()`](https://www.mongodb.com/docs/manual/reference/method/sh.getbalancerstate.md#mongodb-method-sh.getBalancerState) checks if the balancer is enabled (i.e. that the balancer is permitted to run). [`sh.getBalancerState()`](https://www.mongodb.com/docs/manual/reference/method/sh.getbalancerstate.md#mongodb-method-sh.getBalancerState) does not check if the balancer is actively migrating data.

To see if the balancer is enabled in your [sharded cluster](https://www.mongodb.com/docs/manual/reference/glossary.md#std-term-sharded-cluster), run the following command, which returns a boolean:

```javascript
sh.getBalancerState()
```

You can also see if the balancer is enabled using [`sh.status()`](https://www.mongodb.com/docs/manual/reference/method/sh.status.md#mongodb-method-sh.status). The [`currently-enabled`](https://www.mongodb.com/docs/manual/reference/method/sh.status.md#mongodb-data-sh.status.balancer.currently-enabled) field indicates whether the balancer is enabled, and the [`currently-running`](https://www.mongodb.com/docs/manual/reference/method/sh.status.md#mongodb-data-sh.status.balancer.currently-running) field indicates if the balancer is currently running.

## Check if Balancer is Running

To see if the balancer process is active in your [cluster:](https://www.mongodb.com/docs/manual/reference/glossary.md#std-term-sharded-cluster)

1. Connect to any [`mongos`](https://www.mongodb.com/docs/manual/reference/program/mongos.md#mongodb-binary-bin.mongos) in the cluster using the [`mongosh`](https://www.mongodb.com/docs/mongodb-shell.md#mongodb-binary-bin.mongosh) shell.

2. Use the following operation to determine if the balancer is running:

   ```javascript
   sh.isBalancerRunning()
   ```

## Configure Default Range Size

The default range size for a sharded cluster is 128 megabytes. In most situations, the default size is appropriate for splitting and migrating chunks. For information on how range size affects deployments, see details, see [Range Size.](https://www.mongodb.com/docs/manual/core/sharding-data-partitioning.md#std-label-sharding-range-size)

Changing the default range size affects ranges that are processes during migrations and auto-splits but does not retroactively affect all ranges.

To configure default range size, see [Modify Range Size in a Sharded Cluster.](https://www.mongodb.com/docs/manual/tutorial/modify-chunk-size-in-sharded-cluster.md#std-label-tutorial-modifying-chunk-size)

## Schedule the Balancing Window

In some situations, particularly when your data set grows slowly and a migration can impact performance, it is useful to ensure that the balancer is active only at certain times. By default, the balancer process is always enabled and migrating chunks. The following procedure specifies the `activeWindow`, which is the timeframe during which the [balancer](https://www.mongodb.com/docs/manual/reference/glossary.md#std-term-balancer) is able to migrate chunks:

1. Connect to [`mongos`](https://www.mongodb.com/docs/manual/reference/program/mongos.md#mongodb-binary-bin.mongos) using [`mongosh`](https://www.mongodb.com/docs/mongodb-shell.md#mongodb-binary-bin.mongosh).

   You can connect to any [`mongos`](https://www.mongodb.com/docs/manual/reference/program/mongos.md#mongodb-binary-bin.mongos) in the cluster.

2. Switch to the [Config Database](https://www.mongodb.com/docs/manual/reference/config-database.md#std-label-config-database).

   Issue the following command to switch to the config database.

   ```sh
   use config

   ```

3. Ensure that the balancer is not `stopped`.

   The balancer will not activate in the `stopped` state. To ensure that the  balancer is not `stopped`, use [`sh.startBalancer()`](https://www.mongodb.com/docs/manual/reference/method/sh.startbalancer.md#mongodb-method-sh.startBalancer), as in the following:

   ```sh
   sh.startBalancer()

   ```

   The balancer will not start if you are outside of the `activeWindow` timeframe.

4. Modify the balancer's window.

   There are two methods to modify the balancer's active window:

   - Set the `activeWindow` parameter.

     Using `activeWindow` sets the balancing window to be the same everyday. Set the `activeWindow` using [`updateOne()`:](https://www.mongodb.com/docs/manual/reference/method/db.collection.updateone.md#mongodb-method-db.collection.updateOne)

     ```shell
     db.settings.updateOne(
        { _id: "balancer" },
        { $set: { activeWindow : { start : "10:00", stop : "18:00" } } },
        { upsert: true }
     )
     ```

     Replace `<start-time>` and `<end-time>` with time values using two digit hour and minute values (i.e. `HH:MM`) that specify the beginning and end boundaries of the balancing window.

     - For `HH` values, use hour values ranging from `00` - `23`.

     - For `MM` value, use minute values ranging from `00` - `59`.

   - Set the `activeWindowDOW` parameter.

     `activeWindowDOW` allows you to specify balancing windows for different days of the week. Set the `activeWindowDOW` using [`updateOne()`.](https://www.mongodb.com/docs/manual/reference/method/db.collection.updateone.md#mongodb-method-db.collection.updateOne)

     For example, to set the balancing window to be from 9:00am to 5:00pm from Monday to Friday, and all day on Saturday and Sunday, you would run the following:

     ```shell
     db.settings.updateOne(
        { _id: "balancer" },
        { $set: { activeWindowDOW : [
           { day: "Monday", start : "09:00", stop : "17:00" },
           { day: "Tuesday", start : "09:00", stop : "17:00" },
           { day: "Wednesday", start : "09:00", stop : "17:00" },
           { day: "Thursday", start : "09:00", stop : "17:00" },
           { day: "Friday", start : "09:00", stop : "17:00" },
           { day: "Saturday", start : "00:00", stop : "23:59" },
           { day: "Sunday", start : "00:00", stop : "23:59" }
        ]}},
        { upsert: true }
     )
     ```

     To set the balancing window to be overnight from 10:00pm to 6:00am everyday, you would set multiple windows per day:

     ```shell
     db.settings.updateOne(
        { _id: "balancer" },
        { $set: { activeWindowDOW : [
           { day: "Monday", start : "22:00", stop : "23:59" },
           { day: "Tuesday", start : "00:00", stop : "06:00" },
           { day: "Tuesday", start : "22:00", stop : "23:59" },
           { day: "Wednesday", start : "00:00", stop : "06:00" },
           { day: "Wednesday", start : "22:00", stop : "23:59" },
           { day: "Thursday", start : "00:00", stop : "06:00" },
           { day: "Thursday", start : "22:00", stop : "23:59" },
           { day: "Friday", start : "00:00", stop : "06:00" },
           { day: "Friday", start : "22:00", stop : "23:59" },
           { day: "Saturday", start : "00:00", stop : "06:00" },
           { day: "Saturday", start : "22:00", stop : "23:59" },
           { day: "Sunday", start : "00:00", stop : "06:00" },
           { day: "Sunday", start : "22:00", stop : "23:59" }
        ]}},
        { upsert: true }
     )
     ```

     If you set both `activeWindow` and `activeWindowDOW`, the balancer will only be active for the windows configured using `activeWindowDOW`. The balancer ignores `activeWindow`.

   For on-premises or self-managed sharded clusters, MongoDB evaluates the start and stop times relative to the time zone of the primary member in the config server replica set.

   For Atlas clusters, MongoDB evaluates the start and stop times relative to the UTC timezone.

   **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.

## Check Balancing Window

To see the current balancing window, run the following command:

```javascript
use config
db.settings.find( { _id: "balancer" } )
```

## Remove a Balancing Window Schedule

If you have [set the balancing window](https://www.mongodb.com/docs/manual/tutorial/manage-sharded-cluster-balancer.md#std-label-sharding-schedule-balancing-window) and wish to remove the schedule so that the balancer is always running, use [`$unset`](https://www.mongodb.com/docs/manual/reference/operator/update/unset.md#mongodb-update-up.-unset) to clear the schedule.

Clear the `activeWindow` by running:

```shell
db.settings.updateOne( { _id : "balancer" }, { $unset : { activeWindow : true } } )
```

Clear the `activeWindowDOW` by running:

```shell
db.settings.updateOne( { _id : "balancer" }, { $unset : { activeWindowDOW : true } } )
```

If you have both `activeWindow` and `activeWindowDOW` set, you must individually unset both using [`$unset`](https://www.mongodb.com/docs/manual/reference/operator/update/unset.md#mongodb-update-up.-unset) as shown above.

## Disable the Balancer

**Important:**

Leaving the balancer disabled for extended periods of time can lead to unbalanced shards, which degrade cluster performance. Only disable the balancer if necessary, and ensure that you [re-enable the balancer](https://www.mongodb.com/docs/manual/tutorial/manage-sharded-cluster-balancer.md#std-label-sharding-balancing-re-enable) when maintenance is complete.

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:

1. Connect to any [`mongos`](https://www.mongodb.com/docs/manual/reference/program/mongos.md#mongodb-binary-bin.mongos) in the cluster using the [`mongosh`](https://www.mongodb.com/docs/mongodb-shell.md#mongodb-binary-bin.mongosh) shell.

2. Issue the following operation to disable the balancer:

   ```javascript
   sh.stopBalancer()
   ```

   If a migration is in progress, the system will complete the in-progress migration before stopping.

3. To verify that the balancer won't start, run the following command, which returns `false` if the balancer is disabled:

   ```javascript
   sh.getBalancerState()
   ```

   Optionally, to verify no migrations are in progress after disabling, run the following operation in the [`mongosh`](https://www.mongodb.com/docs/mongodb-shell.md#mongodb-binary-bin.mongosh) shell:

   ```javascript
   use config
   while( sh.isBalancerRunning() ) {
             print("waiting...");
             sleep(1000);
   }
   ```

**Note:**

To disable the balancer from a driver, use the **balancerStop** command against the `admin` database, as in the following:

```javascript
db.adminCommand( { balancerStop: 1 } )
```

Starting in MongoDB 7.0, stopping the balancer also disables the [AutoMerger](https://www.mongodb.com/docs/manual/core/automerger-concept.md#std-label-automerger-concept) for the sharded cluster.

## Enable the Balancer

Use this procedure if you have disabled the balancer and are ready to re-enable it:

1. Connect to any [`mongos`](https://www.mongodb.com/docs/manual/reference/program/mongos.md#mongodb-binary-bin.mongos) in the cluster using the [`mongosh`](https://www.mongodb.com/docs/mongodb-shell.md#mongodb-binary-bin.mongosh) shell.

2. Issue one of the following operations to enable the balancer:

   From the [`mongosh`](https://www.mongodb.com/docs/mongodb-shell.md#mongodb-binary-bin.mongosh) shell, issue:

   ```javascript
   sh.startBalancer()
   ```

   **Note:**

   To enable the balancer from a driver, use the **balancerStart** command against the `admin` database, as in the following:

   ```javascript
   db.adminCommand( { balancerStart: 1 } )
   ```

Starting in MongoDB 7.0, starting the balancer also enables the [AutoMerger](https://www.mongodb.com/docs/manual/core/automerger-concept.md#std-label-automerger-concept) for the sharded cluster.

## Disable Balancing During Backups

**Note:**

Disabling the balancer is only necessary when **manually** taking backups, either by calling [`mongodump`](https://www.mongodb.com/docs/database-tools/mongodump.md#std-program-mongodump) or scheduling a task that calls `mongodump` at a specific time.

You do **not** have to disable the balancer when using coordinated backup and restore processes:

- [MongoDB Atlas](https://www.mongodb.com/atlas/database)

- [MongoDB Cloud Manager](https://www.mongodb.com/cloud/cloud-manager)

- [MongoDB Ops Manager](https://www.mongodb.com/products/ops-manager)

If MongoDB migrates a [chunk](https://www.mongodb.com/docs/manual/reference/glossary.md#std-term-chunk) during a [backup](https://www.mongodb.com/docs/manual/core/backups.md), you can end with an inconsistent snapshot of your [sharded cluster](https://www.mongodb.com/docs/manual/reference/glossary.md#std-term-sharded-cluster). Never run a backup while the balancer is active. To ensure that the balancer is inactive during your backup operation:

- Set the [balancing window](https://www.mongodb.com/docs/manual/tutorial/manage-sharded-cluster-balancer.md#std-label-sharding-schedule-balancing-window) so that the balancer is inactive during the backup. Ensure that the backup can complete while you have the balancer disabled.

- [manually disable the balancer](https://www.mongodb.com/docs/manual/tutorial/manage-sharded-cluster-balancer.md#std-label-sharding-balancing-disable-temporarily) for the duration of the backup procedure.

If you turn the balancer off while it is in the middle of a balancing round, the shut down is not instantaneous. The balancer completes the chunk move in-progress and then ceases all further balancing rounds.

Before starting a backup operation, confirm that the balancer is not active. You can use the following command to determine if the balancer is active:

```javascript
!sh.getBalancerState() && !sh.isBalancerRunning()
```

When the backup procedure is complete you can reactivate the balancer process.

## Disable Balancing on a Collection

You can disable balancing for a specific collection with the [`sh.disableBalancing()`](https://www.mongodb.com/docs/manual/reference/method/sh.disablebalancing.md#mongodb-method-sh.disableBalancing) method. You may want to disable the balancer for a specific collection to support maintenance operations or atypical workloads, for example, during data ingestions or data exports.

When you disable balancing on a collection, MongoDB will not interrupt in progress migrations.

To disable balancing on a collection, connect to a [`mongos`](https://www.mongodb.com/docs/manual/reference/program/mongos.md#mongodb-binary-bin.mongos) with the [`mongosh`](https://www.mongodb.com/docs/mongodb-shell.md#mongodb-binary-bin.mongosh) shell and call the [`sh.disableBalancing()`](https://www.mongodb.com/docs/manual/reference/method/sh.disablebalancing.md#mongodb-method-sh.disableBalancing) method.

For example:

```javascript
sh.disableBalancing("students.grades")
```

The [`sh.disableBalancing()`](https://www.mongodb.com/docs/manual/reference/method/sh.disablebalancing.md#mongodb-method-sh.disableBalancing) method accepts as its parameter the full [namespace](https://www.mongodb.com/docs/manual/reference/glossary.md#std-term-namespace) of the collection.

## Enable Balancing on a Collection

You can enable balancing for a specific collection with the [`sh.enableBalancing()`](https://www.mongodb.com/docs/manual/reference/method/sh.enablebalancing.md#mongodb-method-sh.enableBalancing) method.

When you enable balancing for a collection, MongoDB will not *immediately* begin balancing data. However, if the data in your sharded collection is not balanced, MongoDB will be able to begin distributing the data more evenly.

To enable balancing on a collection, connect to a [`mongos`](https://www.mongodb.com/docs/manual/reference/program/mongos.md#mongodb-binary-bin.mongos) with the [`mongosh`](https://www.mongodb.com/docs/mongodb-shell.md#mongodb-binary-bin.mongosh) shell and call the [`sh.enableBalancing()`](https://www.mongodb.com/docs/manual/reference/method/sh.enablebalancing.md#mongodb-method-sh.enableBalancing) method.

For example:

```javascript
sh.enableBalancing("students.grades")
```

The [`sh.enableBalancing()`](https://www.mongodb.com/docs/manual/reference/method/sh.enablebalancing.md#mongodb-method-sh.enableBalancing) method accepts as its parameter the full [namespace](https://www.mongodb.com/docs/manual/reference/glossary.md#std-term-namespace) of the collection.

## Confirm Balancing is Enabled or Disabled

To confirm whether balancing for a collection is enabled or disabled, query the `collections` collection in the `config` database for the collection [namespace](https://www.mongodb.com/docs/manual/reference/glossary.md#std-term-namespace) and check the `noBalance` field. For example:

```javascript
db.getSiblingDB("config").collections.findOne({_id : "students.grades"}).noBalance;
```

This operation will return a null error, `true`, `false`, or no output:

- A null error indicates the collection namespace is incorrect.

- If the result is `true`, balancing is disabled.

- If the result is `false`, balancing is enabled currently but has been disabled in the past for the collection. Balancing of this collection will begin the next time the balancer runs.

- If the operation returns no output, balancing is enabled currently and has never been disabled in the past for this collection. Balancing of this collection will begin the next time the balancer runs.

You can also see if the balancer is enabled using [`sh.status()`](https://www.mongodb.com/docs/manual/reference/method/sh.status.md#mongodb-method-sh.status). The [`currently-enabled`](https://www.mongodb.com/docs/manual/reference/method/sh.status.md#mongodb-data-sh.status.balancer.currently-enabled) field indicates if the balancer is enabled.

## Change Replication Behavior for Chunk Migration

### Secondary Throttle

During chunk migration, the `_secondaryThrottle` value determines when the migration proceeds with next document in the chunk.

In the [`config.settings`](https://www.mongodb.com/docs/manual/reference/config-database.md#mongodb-data-config.settings) collection:

- If the `_secondaryThrottle` setting for the balancer is set to a [write concern](https://www.mongodb.com/docs/manual/reference/glossary.md#std-term-write-concern), each document moved during chunk migration must receive the requested acknowledgment before proceeding with the next document.

- If the `_secondaryThrottle` setting is unset, the migration process does not wait for replication to a secondary and instead continues with the next document.

  This is the default behavior for [WiredTiger.](https://www.mongodb.com/docs/manual/core/wiredtiger.md#std-label-storage-wiredtiger)

To change the `_secondaryThrottle` setting, connect to a [`mongos`](https://www.mongodb.com/docs/manual/reference/program/mongos.md#mongodb-binary-bin.mongos) instance and directly update the `_secondaryThrottle` value in the [`settings`](https://www.mongodb.com/docs/manual/reference/config-database.md#mongodb-data-config.settings) collection of the [config database](https://www.mongodb.com/docs/manual/reference/config-database.md#std-label-config-database). For example, from a [`mongosh`](https://www.mongodb.com/docs/mongodb-shell.md#mongodb-binary-bin.mongosh) shell connected to a [`mongos`](https://www.mongodb.com/docs/manual/reference/program/mongos.md#mongodb-binary-bin.mongos), run the following command:

```javascript
use config
db.settings.updateOne(
   { "_id" : "balancer" },
   { $set : { "_secondaryThrottle" : { "w": "majority" }  } },
   { upsert : true }
)
```

The effects of changing the `_secondaryThrottle` setting may not be immediate. To ensure an immediate effect, stop and restart the balancer to enable the selected value of `_secondaryThrottle`.

For more information on the replication behavior during various steps of chunk migration, see [Range Migration and Replication.](https://www.mongodb.com/docs/manual/core/sharding-balancer-administration.md#std-label-chunk-migration-replication)

- Use the [`moveRange`](https://www.mongodb.com/docs/manual/reference/command/moverange.md#mongodb-dbcommand-dbcmd.moveRange) command's `secondaryThrottle` and `writeConcern` options to specify the behavior during the command.

- Use the [`moveChunk`](https://www.mongodb.com/docs/manual/reference/command/movechunk.md#mongodb-dbcommand-dbcmd.moveChunk) command's `_secondaryThrottle` and `writeConcern` options to specify the behavior during the command.

For details, see [`moveRange`](https://www.mongodb.com/docs/manual/reference/command/moverange.md#mongodb-dbcommand-dbcmd.moveRange) and [`moveChunk`.](https://www.mongodb.com/docs/manual/reference/command/movechunk.md#mongodb-dbcommand-dbcmd.moveChunk)

### Wait for Delete

The `_waitForDelete` setting of the balancer and the [`moveChunk`](https://www.mongodb.com/docs/manual/reference/command/movechunk.md#mongodb-dbcommand-dbcmd.moveChunk) command affects how the balancer migrates multiple chunks from a shard. Similarly, the `_waitForDelete` setting of the balancer and the [`moveRange`](https://www.mongodb.com/docs/manual/reference/command/moverange.md#mongodb-dbcommand-dbcmd.moveRange) command also affect how the balancer migrates multiple chunks from a shard. By default, the balancer does not wait for the on-going migration's delete phase to complete before starting the next chunk migration. To have the delete phase **block** the start of the next chunk migration, you can set the `_waitForDelete` to true.

For details on chunk migration, see [Range Migration](https://www.mongodb.com/docs/manual/core/sharding-data-partitioning.md#std-label-sharding-chunk-migration). For details on the chunk migration queuing behavior, see [Asynchronous Range Migration Cleanup.](https://www.mongodb.com/docs/manual/core/sharding-balancer-administration.md#std-label-chunk-migration-queuing)

**Important:**

When the `_waitForDelete` field is set to `true`, MongoDB does not wait on the [`orphanCleanupDelaySecs`](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.orphanCleanupDelaySecs) delay before performing the range deletion. If you use the `_waitForDelete` parameter and have any read operations occurring on secondaries, the read might terminate due to the migration's delete phase. To learn more, see [`terminateSecondaryReadsOnOrphanCleanup`.](https://www.mongodb.com/docs/manual/reference/parameters.md#mongodb-parameter-param.terminateSecondaryReadsOnOrphanCleanup)

To change the balancer's `_waitForDelete` value:

1. Connect to a [`mongos`](https://www.mongodb.com/docs/manual/reference/program/mongos.md#mongodb-binary-bin.mongos) instance.

2. Update the `_waitForDelete` value in the [`settings`](https://www.mongodb.com/docs/manual/reference/config-database.md#mongodb-data-config.settings) collection of the [config database](https://www.mongodb.com/docs/manual/reference/config-database.md#std-label-config-database). For example:

   ```javascript
   use config
   db.settings.updateOne(
      { "_id" : "balancer" },
      { $set : { "_waitForDelete" : true } },
      { upsert : true }
   )
   ```

Once set to `true`, to revert to the default behavior:

1. Connect to a [`mongos`](https://www.mongodb.com/docs/manual/reference/program/mongos.md#mongodb-binary-bin.mongos) instance.

2. Update or unset the `_waitForDelete` field in the [`settings`](https://www.mongodb.com/docs/manual/reference/config-database.md#mongodb-data-config.settings) collection of the [config database:](https://www.mongodb.com/docs/manual/reference/config-database.md#std-label-config-database)

   ```javascript
   use config
   db.settings.updateOne(
      { "_id" : "balancer", "_waitForDelete": true },
      { $unset : { "_waitForDelete" : "" } }
   )
   ```

### Balance Ranges that Exceed Size Limit

By default, MongoDB cannot move a range if the number of documents in the range is greater than 2 times the result of dividing the configured [range size](https://www.mongodb.com/docs/manual/core/sharding-data-partitioning.md#std-label-sharding-range-size) by the average document size.

By specifying the balancer setting `attemptToBalanceJumboChunks` to `true`, the balancer can migrate these large ranges as long as they have not been labeled as [jumbo.](https://www.mongodb.com/docs/manual/core/sharding-data-partitioning.md#std-label-jumbo-chunk)

To set the balancer's `attemptToBalanceJumboChunks` setting, connect to a [`mongos`](https://www.mongodb.com/docs/manual/reference/program/mongos.md#mongodb-binary-bin.mongos) instance and directly update the [`config.settings`](https://www.mongodb.com/docs/manual/reference/config-database.md#mongodb-data-config.settings) collection. For example, from a [`mongosh`](https://www.mongodb.com/docs/mongodb-shell.md#mongodb-binary-bin.mongosh) shell connected to a [`mongos`](https://www.mongodb.com/docs/manual/reference/program/mongos.md#mongodb-binary-bin.mongos) instance, run the following command:

```javascript
db.getSiblingDB("config").settings.updateOne(
   { _id: "balancer" },
   { $set: { attemptToBalanceJumboChunks : true } },
   { upsert: true }
)
```

If the range you want to move is labeled `jumbo`, you can [manually clear the jumbo flag](https://www.mongodb.com/docs/manual/tutorial/clear-jumbo-flag.md#std-label-clear-jumbo-flag-manually) to have the balancer attempt to migrate the range.

You can also manually migrate ranges that exceed the size limit (with or without the `jumbo` label) using either:

- the [`moveRange`](https://www.mongodb.com/docs/manual/reference/command/moverange.md#mongodb-dbcommand-dbcmd.moveRange) command with the [forceJumbo: true](https://www.mongodb.com/docs/manual/reference/command/moverange.md#std-label-moverange-forceJumbo) option

- the [`moveChunk`](https://www.mongodb.com/docs/manual/reference/command/movechunk.md#mongodb-dbcommand-dbcmd.moveChunk) command with the [forceJumbo: true](https://www.mongodb.com/docs/manual/reference/command/moverange.md#std-label-moverange-forceJumbo) option

However, when you run [`moveRange`](https://www.mongodb.com/docs/manual/reference/command/moverange.md#mongodb-dbcommand-dbcmd.moveRange) or [`moveChunk`](https://www.mongodb.com/docs/manual/reference/command/movechunk.md#mongodb-dbcommand-dbcmd.moveChunk) with `forceJumbo: true`, write operations to the collection may block for a long period of time during the migration.
