Skip to content

Commit 03f4010

Browse files
author
Bob Grabar
committed
DOCS-461 review edits II
1 parent fa7377d commit 03f4010

File tree

2 files changed

+53
-52
lines changed

2 files changed

+53
-52
lines changed

source/reference/command/moveChunk.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ moveChunk
3232
:param _secondaryThrottle: Optional. Set to ``false`` by default. If
3333
set to ``true``, the balancer waits for
3434
replication to :ref:`secondaries
35-
<secondary>` before migrating chunks. For
36-
details, see
35+
<secondary>` while copying and deleting
36+
data during migrations. For details, see
3737
:ref:`sharded-cluster-config-secondary-throttle`.
3838

3939
Use the :method:`sh.moveChunk()` helper in the :program:`mongo`

source/tutorial/configure-sharded-cluster-balancer.txt

Lines changed: 51 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -18,51 +18,6 @@ is necessary, this page describes settings that can be changed.
1818
For conceptual information about the balancer, see
1919
:ref:`sharding-balancing` and :ref:`sharding-balancing-internals`.
2020

21-
.. index:: balancing; secondary throttle
22-
.. index:: secondary throttle
23-
.. _sharded-cluster-config-secondary-throttle:
24-
25-
Require Replication before Chunk Migration (Secondary Throttle)
26-
---------------------------------------------------------------
27-
28-
.. versionadded:: 2.2.1
29-
30-
You can configure the balancer to wait for replication to secondaries
31-
during migrations. You do so by enabling the balancer's
32-
``_secondaryThrottle`` parameter, which reduces throughput (i.e.,
33-
"throttles") in order to decrease the load on secondaries. You might do
34-
this, for example, if you have migration-caused I/O peaks that impact
35-
other workloads
36-
37-
When enabled, secondary throttle puts a ``{ w : 2 }`` write concern on
38-
deletes and on copies, which means the balancer waits for those
39-
operations to replicate to at least one secondary before migrating
40-
chunks.
41-
42-
.. BACKGROUND NOTES
43-
Specifically, secondary throttle affects the first and fourth
44-
phases (informal phases) of chunk migration. Migration can happen during
45-
the second and third phases (the "steady state"):
46-
1) copies the documents in the chunk from shardA to shardB
47-
2) continues to copy over ongoing changes that occurred during the initial copy step,
48-
as well as current changes to that chunk range
49-
3) Stop writes, allow shardB to get final changes, commit migration to config server
50-
4) cleanup now-inactive data on shardA in chunk range (once all cursors are done)
51-
52-
You enable ``_secondaryThrottle`` directly in the
53-
:data:`settings <~config.settings>` collection in the :ref:`config database
54-
<config-database>` by running the following commands from the
55-
:program:`mongo` shell:
56-
57-
.. code-block:: javascript
58-
59-
use config
60-
db.settings.update( { "_id" : "balancer" } , { $set : { "_secondaryThrottle" : true } } )
61-
62-
You also can enable secondary throttle when issuing the
63-
:dbcommand:`moveChunk` command by setting ``_secondaryThrottle`` to
64-
``true``. For more information, see :dbcommand:`moveChunk`.
65-
6621
.. _sharded-cluster-config-balancing-window:
6722

6823
Schedule a Window of Time for Balancing to Occur
@@ -84,7 +39,7 @@ Configure Default Chunk Size
8439
----------------------------
8540

8641
The default chunk size for a sharded cluster is 64 megabytes. In most
87-
situations, the default size is optimal for splitting and migrating
42+
situations, the default size is appropriate for splitting and migrating
8843
chunks. For information on how chunk size affects deployments, see
8944
details, see :ref:`sharding-chunk-size`.
9045

@@ -102,9 +57,10 @@ The ``maxSize`` field in the :data:`~config.shards` collection in the
10257
:ref:`config database <config-database>` sets the maximum size for a
10358
shard, allowing you to control whether the balancer will migrate chunks
10459
to a shard. If :data:`dataSize <~dbStats.dataSize>` is above a shard's
105-
``maxSize``, the balancer will not move chunks to the shard. The
106-
balancer also will not move chunks off the shard. The ``maxSize`` value
107-
only affects the balancer's selection of destination shards.
60+
``maxSize``, the balancer will not move chunks to the shard. Also, the
61+
balancer will not move chunks off an overloaded shard. This must happen
62+
manually. The ``maxSize`` value only affects the balancer's selection of
63+
destination shards.
10864

10965
By default, ``maxSize`` is not specified, allowing shards to consume the
11066
total amount of available space on their machines if necessary.
@@ -140,7 +96,7 @@ megabytes.
14096
.. code-block:: javascript
14197

14298
use config
143-
db.shards.update( { _id : "shard0000" }, { $set : { maxSize : 125 } }, { upsert: true } )
99+
db.shards.update( { _id : "shard0000" }, { $set : { maxSize : 125 } } )
144100

145101
To later increase the ``maxSize`` setting to 250 megabytes, run the
146102
following:
@@ -149,3 +105,48 @@ megabytes.
149105

150106
use config
151107
db.shards.update( { _id : "shard0000" }, { $set : { maxSize : 250 } } )
108+
109+
.. index:: balancing; secondary throttle
110+
.. index:: secondary throttle
111+
.. _sharded-cluster-config-secondary-throttle:
112+
113+
Require Replication before Chunk Migration (Secondary Throttle)
114+
---------------------------------------------------------------
115+
116+
.. versionadded:: 2.2.1
117+
118+
You can configure the balancer to wait for replication to secondaries
119+
during migrations. You do so by enabling the balancer's
120+
``_secondaryThrottle`` parameter, which reduces throughput (i.e.,
121+
"throttles") in order to decrease the load on secondaries. You might do
122+
this, for example, if you have migration-caused I/O peaks that impact
123+
other workloads
124+
125+
When enabled, secondary throttle puts a ``{ w : 2 }`` write concern on
126+
deletes and on copies, which means the balancer waits for those
127+
operations to replicate to at least one secondary before migrating
128+
chunks.
129+
130+
.. BACKGROUND NOTES
131+
Specifically, secondary throttle affects the first and fourth
132+
phases (informal phases) of chunk migration. Migration can happen during
133+
the second and third phases (the "steady state"):
134+
1) copies the documents in the chunk from shardA to shardB
135+
2) continues to copy over ongoing changes that occurred during the initial copy step,
136+
as well as current changes to that chunk range
137+
3) Stop writes, allow shardB to get final changes, commit migration to config server
138+
4) cleanup now-inactive data on shardA in chunk range (once all cursors are done)
139+
140+
You enable ``_secondaryThrottle`` directly in the
141+
:data:`settings <~config.settings>` collection in the :ref:`config database
142+
<config-database>` by running the following commands from the
143+
:program:`mongo` shell:
144+
145+
.. code-block:: javascript
146+
147+
use config
148+
db.settings.update( { "_id" : "balancer" } , { $set : { "_secondaryThrottle" : true } , { upsert : true } } )
149+
150+
You also can enable secondary throttle when issuing the
151+
:dbcommand:`moveChunk` command by setting ``_secondaryThrottle`` to
152+
``true``. For more information, see :dbcommand:`moveChunk`.

0 commit comments

Comments
 (0)