Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-12599

Docs for SERVER-16571: Use Actual Memory Constraint vs. Total System Memory When They Differ

      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:

      1. We set the default WiredTiger cache_size to approximately 1/2 of the memory size
      2. When ephemeral storage is in use we consider the memory limit in place to determine the default oplog size
      3. 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.)

            Assignee:
            kay.kim@mongodb.com Kay Kim (Inactive)
            Reporter:
            kay.kim@mongodb.com Kay Kim (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              4 years, 51 weeks, 1 day ago