Skip to content

Commit 20d116d

Browse files
author
Dave Cuthbert
authored
DOCS-13797 limit simultaneous index builds (#1649)
* DOCS-13797 limit simultaneous index builds * Review feedback * Review feedback * Review feedback * Review feedback * Review feedback * Review feedback
1 parent 335cb12 commit 20d116d

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

source/reference/parameters.txt

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1241,6 +1241,39 @@ General Parameters
12411241

12421242
mongod --setParameter failIndexKeyTooLong=false
12431243

1244+
1245+
.. parameter:: maxNumActiveUserIndexBuilds
1246+
1247+
|mongod-only|
1248+
1249+
*Type*: integer
1250+
1251+
*Default*: 3
1252+
1253+
MongoDB limits the number of concurrent user index builds to control
1254+
WiredTiger cache pressure. The primary node can run up to
1255+
``maxNumActiveUserIndexBuilds`` concurrent user index builds. This is
1256+
a global limit that applies across collections.
1257+
1258+
System indexes are not limited to ``maxNumActiveUserIndexBuilds``,
1259+
however a running system index build will count against the limit for
1260+
user index builds.
1261+
1262+
After reaching ``maxNumActiveUserIndexBuilds``, MongodDB blocks
1263+
additional user index builds until the number of concurrent index
1264+
builds drops below the ``maxNumActiveUserIndexBuilds`` limit. If an
1265+
index build is blocked, the server logs a message, "Too many index
1266+
builds running simultaneously, waiting until the number of active
1267+
index builds is below the threshold".
1268+
1269+
The following command sets a limit of 4 concurrent index builds:
1270+
1271+
.. code-block:: javascript
1272+
1273+
db.adminCommand( { setParameter: 1, maxNumActiveUserIndexBuilds: 4 } )
1274+
1275+
See also: :parameter:`maxIndexBuildMemoryUsageMegabytes`
1276+
12441277
.. parameter:: notablescan
12451278

12461279
|mongod-only|

0 commit comments

Comments
 (0)