[SERVER-23768] Document internalQueryExecMaxBlockingSortBytes in config.yaml Created: 15/Apr/16  Updated: 09/Jan/19  Resolved: 05/May/16

Status: Closed
Project: Core Server
Component/s: Admin
Affects Version/s: 3.2.5, 3.3.4
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Chad Kreimendahl Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-7694 external sort for find command Closed
Participants:
Case:

 Description   

There's no good documentation on internalQueryExecMaxBlockingSortBytes. There's mention of it in SERVER-7676.

Also, please document the consequences. What happens if we up this to 128mb? Does every connection pre-reserve that space?



 Comments   
Comment by Daniel Pasette (Inactive) [ 24/Apr/16 ]

It doesn't reserve the space, but consumes memory as needed.

Comment by Chad Kreimendahl [ 22/Apr/16 ]

Thanks for the response, Dan. This should work for us for the time being. It would be great to get this as a feature that would be supported going forward. We've got a very good handle on how much memory our system uses, and have more than enough on a typical replicaset (400GB free, on average), to handle permanently upping this with a more supported config line.

Does it reserve that space at the beginning of the query, or only use the space it needs? If it's the latter, I'd be happy to push it to 128-256MB. In our case, we only encounter this error approximately once a week, making it a very low risk of exhaustion of resources.

Comment by Daniel Pasette (Inactive) [ 18/Apr/16 ]

All setParameter-style configuration settings can be defined in the configuration file as follows:

setParameter:
    internalQueryExecMaxBlockingSortBytes: 64000000

This is yaml formatting is documented here and the documented parameters are listed here. The reason it is not specifically documented is that it is not a part of the public MongoDB API and we don't want to commit to supporting it in all future versions, which is why it is prefixed with "internal". The aggregation pipeline already supports spilling external sorts to disk and there is an open feature request to extend this functionality to the regular query: SERVER-7694.

Regarding your other question, no that space is not reserved per connection, but if you have many queries performing very large sorts, you run the risk of exhausting free memory.

--Dan

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