[SERVER-47155] Limit the number of simultaneous index builds running from user connections to 3 Created: 27/Mar/20 Updated: 29/Oct/23 Resolved: 02/Apr/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Index Maintenance |
| Affects Version/s: | None |
| Fix Version/s: | 4.4.0-rc0, 4.7.0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Gregory Wlodarek | Assignee: | Gregory Wlodarek |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||||||||||||||||||||||
| Backport Requested: |
v4.4
|
||||||||||||||||||||||||||||||||||||||||||||
| Sprint: | Execution Team 2020-04-06 | ||||||||||||||||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||||||||||||||||
| Linked BF Score: | 18 | ||||||||||||||||||||||||||||||||||||||||||||
| Description |
|
Each index build (i.e. a single createIndexes command, which may build more than one index) is allowed to use up to 200MB of memory outside of the WT cache by default. This is controlled by maxIndexBuildMemoryUsageMegabytes. In an attempt to bound memory usage and reduce WT cache pressure, we introduced a limit the number of concurrent index builds started in On primaries, any index builds started by a user over the limit will block until the number of concurrent index builds drops below the limit. The log message "Too many index builds running simultaneously, waiting until the number of active index builds is below the threshold" (ID 4715500) will be logged when the limit is reached and an index build has blocked. This default limit can be raised with the maxNumActiveUserIndexBuilds setParameter. This can be changed at startup or runtime. Original DescriptionBoth the primary and secondary nodes will have an unlimited thread pool size. This is done to allow secondary nodes to startup as many index builders as necessary in order to prevent scheduling deadlocks during initial sync or oplog application. When commands are run from user connections that need to create indexes, those commands will hang until there are less than 3 running index builder threads, or until the operation is interrupted.
|
| Comments |
| Comment by Mark Callaghan (Inactive) [ 05/Aug/20 ] |
|
Yes, you do. Closed mine as a dup. Sorry for the spam. |
| Comment by Eric Milkie [ 05/Aug/20 ] |
|
We also have |
| Comment by Mark Callaghan (Inactive) [ 05/Aug/20 ] |
|
Filed DOCS-13809 for this to be documented for 4.4 |
| Comment by Daniel Pasette (Inactive) [ 28/Jul/20 ] |
|
louis.williams can you clarify that this is max number of concurrent createIndex commands that can be executed vs. the maximum number of index specifications that can be built concurrently, since the createIndex command can build multiple indexes concurrently. |
| Comment by Mark Callaghan (Inactive) [ 28/Jul/20 ] |
|
Will there be docs for this? I don't see any today via: |
| Comment by Githook User [ 02/Apr/20 ] |
|
Author: {'name': 'Gregory Wlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'username': 'GWlodarek'}Message: (cherry picked from commit c7818dde1a910b6828f24e1e9670688bdd5e5a68) |
| Comment by Githook User [ 02/Apr/20 ] |
|
Author: {'name': 'Gregory Wlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'username': 'GWlodarek'}Message: (cherry picked from commit b3d8a4c33e27f8d4536e6526d2ebb44d289b89c4) |
| Comment by Githook User [ 02/Apr/20 ] |
|
Author: {'name': 'Gregory Wlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'username': 'GWlodarek'}Message: (cherry picked from commit 2f23989e4e0f51e1248d978fa8d8229102ac3019) |
| Comment by Githook User [ 02/Apr/20 ] |
|
Author: {'name': 'Gregory Wlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'username': 'GWlodarek'}Message: |
| Comment by Githook User [ 02/Apr/20 ] |
|
Author: {'name': 'Gregory Wlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'username': 'GWlodarek'}Message: |
| Comment by Githook User [ 02/Apr/20 ] |
|
Author: {'name': 'Gregory Wlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'username': 'GWlodarek'}Message: |