Skip to content

DOCS-4844: Document need to limit WiredTiger cache #2249

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 6 additions & 11 deletions source/administration/production-notes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -214,17 +214,12 @@ WiredTiger will experience negative performance. For information on
active operations, see the active read/write (``ar|aw``) column in the
:program:`mongostat` output.

If you run :program:`mongod` in a container (e.g. ``lxc``, ``cgroups``,
Docker, etc.) that does *not* have access to all of the RAM available
in a system, you must set the
:setting:`wiredTiger.engineConfig.cacheSizeGB` to a value less than the
amount of RAM available in the container. The exact amount depends on
the other processes running in the container.

The size of the WiredTiger cache should be sufficient to hold the
entire working set for the :program:`mongod`. To adjust the size of the
WiredTiger cache, see
:setting:`storage.wiredTiger.engineConfig.cacheSizeGB`.
WiredTiger's default configuration will use either 1GB or half of the
installed physical RAM for cache, whichever is larger. This size is tunable
through the :setting:`storage.wiredTiger.engineConfig.cacheSizeGB` setting, and
should be large enough to hold your entire :term:`working set`.

.. include:: /includes/fact-wiredtiger-cachesizegb.rst

.. seealso:: :ref:`prod-notes-concurrency`

Expand Down
12 changes: 12 additions & 0 deletions source/includes/fact-wiredtiger-cachesizegb.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
The default :setting:`storage.wiredTiger.engineConfig.cacheSizeGB` setting
assumes that there is a single :program:`mongod` instance per node. If a single
node contains multiple instances, then you should adjust the
:setting:`storage.wiredTiger.engineConfig.cacheSizeGB` setting to accomodate the
working set as well as the other :program:`mongod` instances.

If you run :program:`mongod` in a container (e.g. ``lxc``, ``cgroups``,
Docker, etc.) that does *not* have access to all of the RAM available
in a system, you must set the
:setting:`storage.wiredTiger.engineConfig.cacheSizeGB` to a value less than the
amount of RAM available in the container. The exact amount depends on
the other processes running in the container.
4 changes: 3 additions & 1 deletion source/includes/options-mongod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1573,7 +1573,9 @@ description: |

Defines the maximum size of the cache that WiredTiger will use for
all data. Ensure that {{role}} is sufficient to hold the entire
working set for the {{program}} instance.
:term:`working set` for the {{program}} instance.

.. include:: /includes/fact-wiredtiger-cachesizegb.rst
---
program: mongod
name: wiredTigerCheckpointDelaySecs
Expand Down