[SERVER-33122] add option to limit WiredTiger cursor cache size Created: 05/Feb/18  Updated: 29/Oct/23  Resolved: 26/Feb/18

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: 3.4.14, 3.6.4, 3.7.3

Type: Bug Priority: Major - P3
Reporter: Ian Whalen (Inactive) Assignee: Louis Williams
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
is depended on by SERVER-30426 dropDatabase very slow due to repeate... Closed
Related
related to SERVER-32424 Use WiredTiger cursor caching Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v3.6, v3.4
Sprint: Storage 2018-02-26
Participants:
Case:

 Description   

This change introduces a new setParameter wiredTigerCursorCacheSize with a default value of 10,000.

When this is set to 0, caching of WiredTiger cursors is disabled. There is an expected and slight performance degradation from the loss of the cache, but resource usage will be lower because we are not keeping as many cursors open at once. This parameter can be safely set at runtime without requiring a restart of the server.

This will speed up dropDatabase, collection drop, and other operations.



 Comments   
Comment by Scott Glajch [ 23/Oct/18 ]

Thanks Dan!  I swear I looked and googled for a while for that, and of course found it minutes after posting my comment .  It works great!

Comment by Daniel Pasette (Inactive) [ 18/Oct/18 ]

glajchs, you should be able to set it like so:

./3.4.17/bin/mongod --setParameter wiredTigerCursorCacheSize=0

See the docs on the  setParameter command

Comment by Scott Glajch [ 18/Oct/18 ]

How do we use the new "wiredTigerCursorCacheSize" option?  I'm using 3.4.17 (also tried 3.6.5) and I don't see the option to mongod, and if I provide it, it says it's invalid.

Comment by Bruce Lucas (Inactive) [ 01/Jun/18 ]

This change introduces a new parameter wiredTigerCursorCacheSize with a default value of 10,000, which was previously hard-coded.

Comment by Githook User [ 26/Feb/18 ]

Author:

{'email': 'louis.williams@mongodb.com', 'name': 'Louis Williams', 'username': 'louiswilliams'}

Message: SERVER-33122 Add option to disable WiredTiger cursor caching

(cherry picked from commit 0ef1e13db4f3d217ddc6de7ffc46842a4fc9889a)
Branch: v3.4
https://github.com/mongodb/mongo/commit/42ac2a06ab567eb7439073f3a2205ded09c3e50a

Comment by Githook User [ 26/Feb/18 ]

Author:

{'email': 'louis.williams@mongodb.com', 'name': 'Louis Williams', 'username': 'louiswilliams'}

Message: SERVER-33122 Add option to disable WiredTiger cursor caching

(cherry picked from commit 0ef1e13db4f3d217ddc6de7ffc46842a4fc9889a)
Branch: v3.6
https://github.com/mongodb/mongo/commit/44342899b38d0aced0f498b961fa348ac2ea5a59

Comment by Githook User [ 26/Feb/18 ]

Author:

{'email': 'louis.williams@mongodb.com', 'name': 'Louis Williams', 'username': 'louiswilliams'}

Message: SERVER-33122 Add option to disable WiredTiger cursor caching
Branch: master
https://github.com/mongodb/mongo/commit/0ef1e13db4f3d217ddc6de7ffc46842a4fc9889a

Generated at Thu Feb 08 04:32:21 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.