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