Skip to content

Commit 7126881

Browse files
author
Sam Kleinman
committed
DOCS-326 correcting the text to refer to the new migration threshold section.
1 parent 9765d21 commit 7126881

File tree

3 files changed

+23
-24
lines changed

3 files changed

+23
-24
lines changed

source/administration/sharding.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -974,11 +974,11 @@ sense. Sharding works by migrating chunks between the shards until
974974
each shard has roughly the same number of chunks.
975975

976976
The default chunk size is 64 megabytes. MongoDB will not begin
977-
migrations until the shard with the most chunks has 8 more chunks than
978-
the shard with the fewest chunks. While the default chunk size is
979-
configurable with the :setting:`chunkSize` setting, these behaviors
980-
help prevent unnecessary chunk migrations, which can degrade the
981-
performance of your cluster as a whole.
977+
migrations until the imbalance of chunks in the cluster exceeds the
978+
:ref:`migration threshold <sharding-migration-thresholds>`. While the
979+
default chunk size is configurable with the :setting:`chunkSize`
980+
setting, these behaviors help prevent unnecessary chunk migrations,
981+
which can degrade the performance of your cluster as a whole.
982982

983983
If you have just deployed a shard cluster, make sure that you have
984984
enough data to make sharding effective. If you do not have sufficient

source/core/sharding-internals.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -333,15 +333,14 @@ chunks in a collection is unevenly distributed among the shards, the
333333
balancer begins migrating :term:`chunks <chunk>` from shards with more
334334
chunks to shards with a fewer number of chunks. The balancer will
335335
continue migrating chunks, one at a time, until the data is evenly
336-
distributed among the shards. See the :ref:`migration thresholds
337-
<sharding-migration-thresholds>` section for more information.
336+
distributed among the shards.
338337

339338
While these automatic chunk migrations are crucial for distributing
340339
data, they carry some overhead in terms of bandwidth and workload,
341340
both of which can impact database performance. As a result, MongoDB
342341
attempts to minimize the effect of balancing by only migrating chunks
343-
when the difference between the number of chunks on shards are greater
344-
than 8.
342+
when the distribution of chunks passes the :ref:`migration thresholds
343+
<sharding-migration-thresholds>`.
345344

346345
.. index:: balancing; migration
347346

source/core/sharding.txt

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -191,18 +191,17 @@ Data
191191
Your cluster must manage a significant quantity of data for sharding
192192
to have an effect on your collection. The default :term:`chunk` size
193193
is 64 megabytes, [#chunk-size]_ and the :ref:`balancer
194-
<sharding-balancing>` will not begin moving data until the shard with
195-
the greatest number of chunks has *8 more* chunks than the shard with
196-
least number of chunks.
197-
198-
Practically, this means that unless there is 512 megabytes of data,
199-
all of the data will remain on the same shard. You can set a smaller
200-
chunk size, or :ref:`manually create splits in your collection
201-
<sharding-procedure-create-split>` using the :func:`sh.splitFind()` and
202-
:func:`sh.splitAt()` operations in the :program:`mongo` shell.
203-
Remember that the default chunk size and migration threshold
204-
are explicitly configured to prevent unnecessary splitting or
205-
migrations.
194+
<sharding-balancing>` will not begin moving data until the imbalance
195+
of chunks in the cluster exceeds the :ref:`migration threshold
196+
<sharding-migration-thresholds>`.
197+
198+
Practically, this means that unless your cluster has enough data,
199+
chunks will remain on the same shard. You can set a smaller chunk
200+
size, or :ref:`manually create splits in your collection
201+
<sharding-procedure-create-split>` using the :func:`sh.splitFind()`
202+
and :func:`sh.splitAt()` operations in the :program:`mongo` shell.
203+
Remember that the default chunk size and migration threshold are
204+
explicitly configured to prevent unnecessary splitting or migrations.
206205

207206
While there are some exceptional situations where you may need to
208207
shard a small collection of data, most of the time the additional
@@ -453,9 +452,10 @@ have on the cluster, by:
453452

454453
- Only moving one chunk at a time.
455454

456-
- Only initiating a balancing round if there is a difference of *more
457-
than* 8 chunks between the shard with the greatest and the shard with
458-
the least number of chunks.
455+
- Only initiating a balancing round when the difference in number of
456+
chunks between the shard with the greatest and the shard with the
457+
least number of chunks exceeds the :ref:`migration threshold
458+
<sharding-migration-thresholds>`.
459459

460460
Additionally, it's possible to disable the balancer on a temporary
461461
basis for maintenance and limit the window during which it runs to

0 commit comments

Comments
 (0)