Details
-
Task
-
Status: Closed
-
Major - P3
-
Resolution: Fixed
-
None
Description
Description
Description:
We should add a note here: https://docs.mongodb.com/manual/core/wiredtiger/#memory-use
Which says that if the database has memory limits placed on it which are lower than the system memory, for example when running in a container, then that is used as the maximum RAM available rather than the total system memory.
We should do something similar anywhere else that we call out memory calculations anywhere else that are used for actions/defaults related to the memory available to MongoDB.We should note that the hostInfo command contains a new field, memLimitMB, which tells you if the host is placing any memory usage limit on the process (for example when using containers).
Note: this work was backported to 4.0 and 3.6.
Engineering Ticket Description:
The memory size is taken into account within various components today:
- We set the default WiredTiger cache_size to approximately 1/2 of the memory size
- When ephemeral storage is in use we consider the memory limit in place to determine the default oplog size
- We set the tcmalloc cache size to 1/8th of the available memory
In all of these cases we should take the actual memory constraint that we're operating under into account rather than the total system memory – for example when running MongoDB within containers.
Scope of changes
Impact to Other Docs
MVP (Work and Date)
Resources (Scope or Design Docs, Invision, etc.)
Attachments
Issue Links
- documents
-
SERVER-16571 Use Actual Memory Constraint vs. Total System Memory When They Differ
-
- Closed
-
- related to
-
DOCS-13072 SELinux and actual memory usage warnings
-
- Closed
-