Skip to content

Commit f13287c

Browse files
Dave Cuthbertjason-price-mongodbjason-price-mongodb
authored
DOCSP-29353 BACKPORT (#3021)
* DOCSP-29353 BACKPORT * DOCSP-25925-migrationConcurrency (#2144) * DOCSP-25925-migrationConcurrency * DOCSP-25925-migrationConcurrency * DOCSP-25925-migrationConcurrency * DOCSP-25925-migrationConcurrency * DOCSP-25925-migrationConcurrency * DOCSP-25925-migrationConcurrency * DOCSP-25925-migrationConcurrency * DOCSP-25925-migrationConcurrency * DOCSP-25925-migrationConcurrency * DOCSP-25925-migrationConcurrency * DOCSP-25925-migrationConcurrency Co-authored-by: jason-price-mongodb <[email protected]> * DOCS-15911-update-chunkMigrationConcurrency (#2604) * DOCS-15911-update-chunkMigrationConcurrency * DOCS-15911-update-chunkMigrationConcurrency * DOCS-15911-update-chunkMigrationConcurrency * DOCS-15911-update-chunkMigrationConcurrency * DOCS-15911-update-chunkMigrationConcurrency --------- Co-authored-by: jason-price-mongodb <[email protected]> * DOCSP-29353 BACKPORT --------- Co-authored-by: jason-price-mongodb <[email protected]> Co-authored-by: jason-price-mongodb <[email protected]>
1 parent 1f044a9 commit f13287c

File tree

3 files changed

+61
-3
lines changed

3 files changed

+61
-3
lines changed

source/reference/command/serverStatus.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4441,6 +4441,16 @@ shardingStatistics
44414441

44424442
.. versionadded:: 4.4
44434443

4444+
.. serverstatus:: shardingStatistics.chunkMigrationConcurrency
4445+
4446+
The number of threads on the source shard and the receiving shard for
4447+
performing :ref:`chunk migration <migrate-chunks-sharded-cluster>`
4448+
operations.
4449+
4450+
*Only present when run on a shard.*
4451+
4452+
*Available starting in MongoDB 6.3 (and 6.0.5 and 5.0.15).*
4453+
44444454
.. serverstatus:: shardingStatistics.catalogCache
44454455

44464456
A document with statistics about the cluster's routing information cache.

source/reference/parameters.txt

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2972,6 +2972,49 @@ Sharding Parameters
29722972

29732973
db.adminCommand( { setParameter: 1, chunkDefragmentationThrottlingMS: 10 } )
29742974

2975+
.. parameter:: chunkMigrationConcurrency
2976+
2977+
*Available starting in MongoDB 6.0.5 (and 5.0.15).*
2978+
2979+
*Type*: integer
2980+
2981+
*Default*: 1
2982+
2983+
|both|
2984+
2985+
Specifies an integer that sets the number of threads on the source
2986+
shard and the receiving shard for :ref:`chunk migration
2987+
<migrate-chunks-sharded-cluster>`.
2988+
2989+
Increasing the concurrency improves chunk migration performance, but
2990+
also increases the workload and disk IOPS usage on the the source
2991+
shard and the receiving shard.
2992+
2993+
Maximum value is 500.
2994+
2995+
You should typically use half the total number of CPU cores as
2996+
threads. For example, if the total is 16 cores, set
2997+
``chunkMigrationConcurrency`` to 8 threads (or fewer).
2998+
2999+
If ``chunkMigrationConcurrency`` is greater than ``1``, the
3000+
``_secondaryThrottle`` configuration setting is ignored. The
3001+
``_secondaryThrottle`` setting determines when the chunk migration
3002+
proceeds with the next document in the chunk. For details, see
3003+
:ref:`chunk-migration-replication`.
3004+
3005+
The following example sets ``chunkMigrationConcurrency`` to ``5``:
3006+
3007+
.. code-block:: bash
3008+
3009+
mongod --setParameter chunkMigrationConcurrency=5
3010+
3011+
During runtime, you can also set the parameter with the
3012+
:dbcommand:`setParameter` command:
3013+
3014+
.. code-block:: javascript
3015+
3016+
db.adminCommand( { setParameter: 1, chunkMigrationConcurrency: 5 } )
3017+
29753018
.. parameter:: disableResumableRangeDeleter
29763019

29773020
.. versionadded:: 4.4

source/tutorial/migrate-chunks-in-sharded-cluster.txt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,14 @@ you may want to migrate ranges manually in a few cases:
2626
you will have to migrate ranges manually.
2727

2828
To manually migrate ranges, use the :dbcommand:`moveChunk` or
29-
:dbcommand:`moveRange` command. For more information on how the
30-
automatic balancer moves ranges between shards, see
31-
:ref:`sharding-balancing-internals` and :ref:`sharding-range-migration`.
29+
:dbcommand:`moveRange` command.
30+
31+
For more information on how the automatic balancer moves ranges between
32+
shards, see :ref:`sharding-balancing-internals` and
33+
:ref:`sharding-range-migration`.
34+
35+
For more information on tuning the migration, see
36+
:parameter:`chunkMigrationConcurrency`.
3237

3338
.. example:: Migrate a single range
3439

0 commit comments

Comments
 (0)