Priority: Major - P3
Affects Version/s: 3.2.6
Fix Version/s: None
We are using MongoDB 3.2.6 with WiredTiger storageEngine. Below is the Replica set Configuration:
Replica set Configuration:
Total members: 3
Roles: Primary, Secondary, Secondary
Memory Allocated to each server: 32GB
Relative data size: 3-4GB
Memory usage of one of the secondary members has slowly grown and reached up to 75%. This triggers continuous alerts from the monitoring system used to monitor the replica set deployment.
The memory usage keeps growing gradually hence the alerts are triggered, We mongodb to release memory when the usage is reduced.
This document on WiredTigers memory usage outlines the memory usage percentage by WiredTiger cache and File system cache. Adhering to those estimations for the aforementioned deployments it should use:
WiredTiger internal cache memory usage: 60% of RAM minus 1 GB = 16.4GB
Below are some concerns we need to get addressed:
1. Will the mongod process go out of memory if the memory usage keeps growing gradually?
2. Why does it use 75% of memory of relatively small size of data?
3. Why doesn't wiredTiger releases memory when other operations are performed?
4. What is the best solution or workaround to mitigate the high memory usage?
Below are the server specific stats: