From 3359b2887dc45b37e85952a87acff40577ae75d3 Mon Sep 17 00:00:00 2001 From: Jonathan Wilson Date: Thu, 6 Feb 2025 09:15:32 -0800 Subject: [PATCH] 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 92b74d74b..29a4a4996 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 ~~~~~~~~~~~~~~~~~~~~~~~