Skip to content

Commit b622beb

Browse files
committed
DOCS-4844: Document need to limit WiredTiger cache
1 parent 38957d7 commit b622beb

File tree

3 files changed

+21
-12
lines changed

3 files changed

+21
-12
lines changed

source/administration/production-notes.txt

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -214,17 +214,12 @@ WiredTiger will experience negative performance. For information on
214214
active operations, see the active read/write (``ar|aw``) column in the
215215
:program:`mongostat` output.
216216

217-
If you run :program:`mongod` in a container (e.g. ``lxc``, ``cgroups``,
218-
Docker, etc.) that does *not* have access to all of the RAM available
219-
in a system, you must set the
220-
:setting:`wiredTiger.engineConfig.cacheSizeGB` to a value less than the
221-
amount of RAM available in the container. The exact amount depends on
222-
the other processes running in the container.
223-
224-
The size of the WiredTiger cache should be sufficient to hold the
225-
entire working set for the :program:`mongod`. To adjust the size of the
226-
WiredTiger cache, see
227-
:setting:`storage.wiredTiger.engineConfig.cacheSizeGB`.
217+
WiredTiger's default configuration will use either 1GB or half of the
218+
installed physical RAM for cache, whichever is larger. This size is tunable
219+
through the :setting:`storage.wiredTiger.engineConfig.cacheSizeGB` setting, and
220+
should be large enough to hold your entire :term:`working set`.
221+
222+
.. include:: /includes/fact-wiredtiger-cachesizegb.rst
228223

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
The default value for this setting is optimized for a single :program:`mongod`
2+
instance per node. If a single node contains multiple instances, then you should
3+
change :setting:`storage.wiredTiger.engineConfig.cacheSizeGB` for each instance
4+
to a value that is large enough to encompass the entire working dataset,
5+
but that also leaves room for the other :program:`mongod` instances.
6+
7+
If you run :program:`mongod` in a container (e.g. ``lxc``, ``cgroups``,
8+
Docker, etc.) that does *not* have access to all of the RAM available
9+
in a system, you must set the
10+
:setting:`storage.wiredTiger.engineConfig.cacheSizeGB` to a value less than the
11+
amount of RAM available in the container. The exact amount depends on
12+
the other processes running in the container.

source/includes/options-mongod.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1573,7 +1573,9 @@ description: |
15731573
15741574
Defines the maximum size of the cache that WiredTiger will use for
15751575
all data. Ensure that {{role}} is sufficient to hold the entire
1576-
working set for the {{program}} instance.
1576+
:term:`working set` for the {{program}} instance.
1577+
1578+
.. include:: /includes/fact-wiredtiger-cachesizegb.rst
15771579
---
15781580
program: mongod
15791581
name: wiredTigerCheckpointDelaySecs

0 commit comments

Comments
 (0)