Skip to content

Commit 2f65486

Browse files
author
Bob Grabar
committed
DOCS-983 splitting chunks
1 parent 3139fef commit 2f65486

File tree

3 files changed

+39
-9
lines changed

3 files changed

+39
-9
lines changed

source/reference/command/split.txt

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,20 @@ split
1212
this command makes it possible for administrators to manually
1313
create splits.
1414

15-
.. admonition:: In normal operation there is no need to manually split chunks
16-
17-
The :term:`balancer` and other sharding infrastructure will
18-
automatically create chunks in the course of normal
19-
operations. See :doc:`/core/sharded-cluster-internals` for more
20-
information.
15+
In normal operation there is no need to manually split chunks. The
16+
:term:`balancer` and other sharding infrastructure will automatically
17+
create chunks in the course of normal operations. See
18+
:doc:`/core/sharded-cluster-internals` for more information.
19+
20+
.. warning::
21+
22+
Be careful when splitting chunks. When you shard a collection that
23+
has existing data, MongoDB automatically creates chunks to evenly
24+
spread the collection. Performing additional splits requires
25+
knowledge of the resulting chunk sizes by numbers of documents and by
26+
size. You do not want splits that cause some chunks to be much larger
27+
than others. This leads to balancing based on count of chunks, not on
28+
their size, which may cause extreme load/data-distribution problems.
2129

2230
Consider the following example:
2331

source/reference/command/splitChunk.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,14 @@ splitChunk
1010
:method:`sh.splitFind()` and :method:`sh.splitAt()` functions in the
1111
:program:`mongo` shell to access this functionality.
1212

13+
.. warning::
14+
15+
Be careful when splitting chunks. When you shard a collection that
16+
has existing data, MongoDB automatically creates chunks to evenly
17+
spread the collection. Performing additional splits requires
18+
knowledge of the resulting chunk sizes by numbers of documents and by
19+
size. You do not want splits that cause some chunks to be much larger
20+
than others. This leads to balancing based on count of chunks, not on
21+
their size, which may cause extreme load/data-distribution problems.
22+
1323
.. admin-only.

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

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,16 @@ You may want to split chunks manually if:
5858
values between ``300`` and ``400``, *but* all values of your shard
5959
keys are between ``250`` and ``500`` are in a single chunk.
6060

61+
.. warning::
62+
63+
Be careful when splitting chunks. When you shard a collection that
64+
has existing data, MongoDB automatically creates chunks to evenly
65+
spread the collection. Performing additional splits requires
66+
knowledge of the resulting chunk sizes by numbers of documents and by
67+
size. You do not want splits that cause some chunks to be much larger
68+
than others. This leads to balancing based on count of chunks, not on
69+
their size, which may cause extreme load/data-distribution problems.
70+
6171
Use :method:`sh.status()` to determine the current chunks ranges across
6272
the cluster.
6373

@@ -101,11 +111,13 @@ chunk splits.
101111
Create Chunks (Pre-Splitting)
102112
-----------------------------
103113

114+
Pre-splitting lets you preemptively split chunks in an empty collection
115+
and is used *only* in certain situations.
104116
In most situations a :term:`sharded cluster` will create and distribute
105117
chunks automatically without user intervention. However, in a limited
106118
number of use profiles, MongoDB cannot create enough chunks or
107-
distribute data fast enough to support required throughput. Consider
108-
the following scenarios:
119+
distribute data fast enough to support required throughput.
120+
For example, if:
109121

110122
- you must partition an existing data collection that resides on a
111123
single shard.
@@ -123,7 +135,7 @@ the following scenarios:
123135
Preemptively splitting chunks increases cluster throughput for these
124136
operations, by reducing the overhead of migrating chunks that hold
125137
data during the write operation. MongoDB only creates splits after an
126-
insert operation, and can only migrate a single chunk at a time. Chunk
138+
insert operation and can migrate only a single chunk at a time. Chunk
127139
migrations are resource intensive and further complicated by large
128140
write volume to the migrating chunk.
129141

0 commit comments

Comments
 (0)