Skip to content

Commit fcd8200

Browse files
DOCSP-46973-adds-large-destination-index-FAQ (#579)
* DOCSP-46973-adds-large-destination-index-FAQ * Updates compact to use command role * Reverts previous commit * Update phrasing * Update to specify correlation * Update source/faq.txt Co-authored-by: ltran-mdb2 <[email protected]> * Update source/faq.txt Co-authored-by: ltran-mdb2 <[email protected]> * Responds to comments --------- Co-authored-by: ltran-mdb2 <[email protected]>
1 parent e89c0c7 commit fcd8200

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

source/faq.txt

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,30 @@ To learn more about permissable reads and writes during synchronization, see :re
4646
Index builds on the destination cluster are treated as writes
4747
while ``mongosync`` is syncing.
4848

49+
Why are the destination cluster indexes larger than the source cluster indexes?
50+
-------------------------------------------------------------------------------
51+
52+
The following factors may contribute to an increase in index size on destination
53+
clusters:
54+
55+
- ``mongosync`` inserts and removes data during a migration, which can cause data
56+
to be stored inefficiently on disk.
57+
- By default, ``mongosync`` builds indexes before copying data. ``mongosync``
58+
copies data in ``_id`` order. If an index is not correlated with ``_id``,
59+
the index size can become large. For more information, see the MongoDB Manual
60+
:ref:`FAQ: Indexes<faq-indexes-random-data-performance>` page.
61+
62+
Use the following methods to mitigate an increase in index size:
63+
64+
- Restart the migration with the ``buildIndexes``
65+
:ref:`parameter <c2c-api-start-params>` set to ``never``. When the migration
66+
finishes, manually build indexes on the destination cluster.
67+
- After the migration, perform a rolling :ref:`initial sync <replica-set-sync>`
68+
on the destination cluster.
69+
- After the migration, run :ref:`<compact>` on the destination cluster. This
70+
rebuilds indexes and releases unneeded disk space to the OS, but may impact
71+
cluster :ref:`performance <compact-perf>`.
72+
4973
Can ``mongosync`` run on its own hardware?
5074
------------------------------------------
5175

source/reference/api/start.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ Request
5757

5858
POST /api/v1/start
5959

60+
.. _c2c-api-start-params:
61+
6062
Request Body Parameters
6163
~~~~~~~~~~~~~~~~~~~~~~~
6264

0 commit comments

Comments
 (0)