@@ -46,6 +46,30 @@ To learn more about permissable reads and writes during synchronization, see :re
46
46
Index builds on the destination cluster are treated as writes
47
47
while ``mongosync`` is syncing.
48
48
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
+
49
73
Can ``mongosync`` run on its own hardware?
50
74
------------------------------------------
51
75
0 commit comments