[SERVER-75295] Disallow use of the 'planCacheSize' parameter on 6.0 and earlier versions Created: 24/Mar/23  Updated: 29/Oct/23  Resolved: 11/Sep/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 6.0.5
Fix Version/s: 6.0.11

Type: Question Priority: Major - P3
Reporter: Nagasai Pallapotu Assignee: Parker Felix
Resolution: Fixed Votes: 0
Labels: neweng, query-director-triage
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Ubuntu 18.04 on-prem system with Mongo V6.0.0


Issue Links:
Depends
Documented
is documented by DOCS-16375 Investigate changes in SERVER-75295: ... Backlog
Related
is related to DOCS-15997 [Server] Improve documentation of "pl... Closed
Assigned Teams:
Query Execution
Backwards Compatibility: Minor Change
Sprint: QE 2023-05-15, QE 2023-05-29, QE 2023-06-12, QE 2023-06-26
Participants:

 Description   

planCacheSize which is introduced in mongodb V5.1 as a rapid release is not available for on-prem and hence we tried to upgrade to Mongo V6 and test this option but unfortunately, we couldn't see any difference in the planCacheSize even after adding this to mongo config or via command line.

 

Scenario:

We are working on adding transaction support in our project. We have a 3 node replica set with PSA topology and since we are using transactions for our "Bot Publish" feature, mongodb retains all the data related to botpublish in cache until transaction is success. this data resides in cache which is also used for plancache, dirty cache that is not yet written to disk (incldues any transaction's data too).

 

What we observed is mongo's default cache size is (n-1)/2 and in this (n-1)/2 size of cache, 80% is provided to plancache + transaction data and another 20% is for dirty cache that is yet to be written to disk (our assumption). we thought to reduce plancache size and provide more space for transaction data as our transactions are huge running operations, we couldn't do it even after using planCacheSize which is introduced in Mongo V6 on-prem, we added planCacheSize to 5%, 10% etc in config but still see it is taking significantly more RAM (like 50% also).

Please help us on how to set planCacheSize in MongoV6 in Ubuntu 18.04 OS



 Comments   
Comment by Githook User [ 05/Sep/23 ]

Author:

{'name': 'Parker Felix', 'email': 'parker.felix@mongodb.com', 'username': 'parker-felix'}

Message: SERVER-75295 Disallow use of the 'planCacheSize' parameter on 6.0 and earlier versions
Branch: v6.0
https://github.com/mongodb/mongo/commit/9a1bf5701761d034f0f448a49d5878f271e1917c

Comment by David Storch [ 29/Jun/23 ]

kyle.suarez@mongodb.com it seems like this ticket has been forgotten, but just needs an assignee. I'm putting it on the query director triage queue.

Comment by Kyle Suarez [ 04/Apr/23 ]

Because planCacheSize isn't expected to work in 6.0, I am repurposing this ticket to have the command throw an error. (Note that we don't intend to make any changes in 6.3 or 7.0.)

Comment by David Storch [ 31/Mar/23 ]

Hi nagasai.pallapotu@kore.com! Thanks for filing this issue. While I didn't follow all of the details around the description of your scenario, I wanted to respond specifically to your inquiry about planCacheSize. This parameter controls the amount of memory used outside the WiredTiger cache to store compiled query plans which can be reused by subsequent queries of the same shape. I believe there is a mistake in our documentation around this parameter: see DOCS-15997. To summarize the DOCS ticket: planCacheSize has no effect until version 6.3. The reason is that planCacheSize pertains specifically to our new execution engine (the slot-based execution engine, or SBE). We are in the process of shipping SBE in a piecewise fashion and SBE's plan cache was first enabled in 6.3.

DOCS-15997 tracks the work to clarify that planCacheSize only applies to SBE and is only useful starting in MongoDB 6.3. In addition, we should use this ticket to consider whether to actively prohibit users from configuring planCacheSize on older versions. I think it was accidental that we shipped versions of the MongoDB server in which the SBE plan cache is disabled but the planCacheSize parameter for this new plan cache isn't.

Comment by Tammy Bailey (Inactive) [ 27/Mar/23 ]

Moving to the server team as I believe this functionality is found at their level.

Generated at Thu Feb 08 06:29:49 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.