diff --git a/source/reference/command/validate.txt b/source/reference/command/validate.txt index 80c007f255e..abed2dc758c 100644 --- a/source/reference/command/validate.txt +++ b/source/reference/command/validate.txt @@ -71,6 +71,9 @@ Definition Behavior -------- +Performance +~~~~~~~~~~~ + The :dbcommand:`validate` command can be slow, particularly on larger data sets. @@ -80,6 +83,19 @@ until the operation finishes. When run on a secondary, the :dbcommand:`validate` operation can block all other operations on that secondary until it finishes. +.. warning:: + + Due to the performance impact of validation, consider running + :dbcommand:`validate` only on :term:`secondary` replica set nodes. + You can use :method:`rs.stepDown()` to instruct the current + :term:`primary` node to become a secondary to avoid impacting a live + primary node. + +Data Throughput Metrics +~~~~~~~~~~~~~~~~~~~~~~~ + +.. include:: /includes/extracts/4.4-validate-data-throughput.rst + Restrictions ~~~~~~~~~~~~~ diff --git a/source/reference/method/db.collection.validate.txt b/source/reference/method/db.collection.validate.txt index d0feceb3d6a..758c9e2408c 100644 --- a/source/reference/method/db.collection.validate.txt +++ b/source/reference/method/db.collection.validate.txt @@ -70,8 +70,12 @@ Description Behavior -------- +Performance +~~~~~~~~~~~ + The :method:`db.collection.validate()` method is potentially resource -intensive and may impact the performance of your MongoDB instance. +intensive and may impact the performance of your MongoDB instance, +particularly on larger data sets. The :method:`db.collection.validate()` method obtains an exclusive lock on the collection. This will block all reads and writes on the @@ -79,8 +83,16 @@ collection until the operation finishes. When run on a secondary, the operation can block all other operations on that secondary until it finishes. -The :method:`db.collection.validate()` method can be slow, particularly -on larger data sets. +.. warning:: + + Due to the performance impact of validation, consider running + :method:`db.collection.validate()` only on :term:`secondary` replica + set nodes. You can use :method:`rs.stepDown()` to instruct the + current :term:`primary` node to become a secondary to avoid + impacting a live primary node. + +Data Throughput Metrics +~~~~~~~~~~~~~~~~~~~~~~~ Examples