From 001178561e4697ac4a9b842662be9308eac58e56 Mon Sep 17 00:00:00 2001 From: Jonathan Wilson Date: Thu, 6 Feb 2025 09:15:32 -0800 Subject: [PATCH 1/3] 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 <143426234+ltran-mdb2@users.noreply.github.com> * Update source/faq.txt Co-authored-by: ltran-mdb2 <143426234+ltran-mdb2@users.noreply.github.com> * Responds to comments --------- Co-authored-by: ltran-mdb2 <143426234+ltran-mdb2@users.noreply.github.com> (cherry picked from commit fcd82009e96e3536d735a55aa7f8bdd6fe0de1da) --- source/faq.txt | 24 ++++++++++++++++++++++++ source/reference/api/start.txt | 2 ++ 2 files changed, 26 insertions(+) diff --git a/source/faq.txt b/source/faq.txt index d20c0c26b..f03943902 100644 --- a/source/faq.txt +++ b/source/faq.txt @@ -45,6 +45,30 @@ To learn more about permissable reads and writes during synchronization, see :re Index builds on the destination cluster are treated as writes while ``mongosync`` is syncing. +Why are the destination cluster indexes larger than the source cluster indexes? +------------------------------------------------------------------------------- + +The following factors may contribute to an increase in index size on destination +clusters: + +- ``mongosync`` inserts and removes data during a migration, which can cause data + to be stored inefficiently on disk. +- By default, ``mongosync`` builds indexes before copying data. ``mongosync`` + copies data in ``_id`` order. If an index is not correlated with ``_id``, + the index size can become large. For more information, see the MongoDB Manual + :ref:`FAQ: Indexes` page. + +Use the following methods to mitigate an increase in index size: + +- Restart the migration with the ``buildIndexes`` + :ref:`parameter ` set to ``never``. When the migration + finishes, manually build indexes on the destination cluster. +- After the migration, perform a rolling :ref:`initial sync ` + on the destination cluster. +- After the migration, run :ref:`` on the destination cluster. This + rebuilds indexes and releases unneeded disk space to the OS, but may impact + cluster :ref:`performance `. + Can ``mongosync`` run on its own hardware? ------------------------------------------ diff --git a/source/reference/api/start.txt b/source/reference/api/start.txt index b4c358c32..d10f9dd37 100644 --- a/source/reference/api/start.txt +++ b/source/reference/api/start.txt @@ -57,6 +57,8 @@ Request POST /api/v1/start +.. _c2c-api-start-params: + Request Body Parameters ~~~~~~~~~~~~~~~~~~~~~~~ From 1ed14b064d1c9a5ac1ae92021de2e8f729cb369f Mon Sep 17 00:00:00 2001 From: Jonathan Wilson Date: Thu, 6 Feb 2025 09:44:46 -0800 Subject: [PATCH 2/3] Update start.txt --- source/reference/api/start.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/source/reference/api/start.txt b/source/reference/api/start.txt index d10f9dd37..4db4de7de 100644 --- a/source/reference/api/start.txt +++ b/source/reference/api/start.txt @@ -57,6 +57,7 @@ Request POST /api/v1/start + .. _c2c-api-start-params: Request Body Parameters From 13dbed90e121f8d5017fe7629203f0a9850cee41 Mon Sep 17 00:00:00 2001 From: Jonathan Wilson Date: Thu, 6 Feb 2025 09:46:02 -0800 Subject: [PATCH 3/3] Update start.txt --- source/reference/api/start.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/source/reference/api/start.txt b/source/reference/api/start.txt index 4db4de7de..d10f9dd37 100644 --- a/source/reference/api/start.txt +++ b/source/reference/api/start.txt @@ -57,7 +57,6 @@ Request POST /api/v1/start - .. _c2c-api-start-params: Request Body Parameters