[SERVER-42138] Memory used by ChunkManager objects can grow without bound Created: 10/Jul/19  Updated: 05/Dec/22  Resolved: 25/Nov/22

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

Type: Bug Priority: Major - P3
Reporter: Matthew Saltz (Inactive) Assignee: [DO NOT USE] Backlog - Sharding EMEA
Resolution: Won't Do Votes: 0
Labels: sharding-causes-bfs-hard, sharding-common-backlog
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-35666 mongod process consumes all memory an... Closed
related to SERVER-36443 Long-running queries should not cause... Closed
Assigned Teams:
Sharding EMEA
Operating System: ALL
Participants:

 Description   

ChunkManager objects are kept around as long as there is a query using them. If there are a lot of long-running queries and also a lot of chunk moves/splits/merges, this can lead to a build-up of ChunkManager objects in-memory which is unbounded. We should either optimize this somehow or put a cap on the memory used by the ChunkManager, or at the very least figure out how to issue a warning that there are a lot of ChunkManager objects.

As a side note it could also be good to at least include the number of open metadata snapshots/ChunkManager objects in FTDC data since this has been a problem on several occasions.



 Comments   
Comment by Tommaso Tocci [ 25/Nov/22 ]

This is still a problem on master (6.2) but we believe that SERVER-36443, PM-2321 and PM-2323 reduced the likelihood that the ChunkManager will consume a lot of memory. 

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