@@ -26,7 +26,7 @@ other processes:
2626
2727- track each incoming connection with a file descriptor *and* a thread.
2828
29- - track each internal thread or *pthread* as a system process.
29+ - track each internal thread or *pthread* as a system process.
3030
3131``mongod``
3232~~~~~~~~~~
@@ -38,7 +38,7 @@ other processes:
3838 :program:`mongod` instance when :setting:`journal` is ``true``.
3939
4040- In replica sets, each :program:`mongod` maintains a connection to
41- all other members of the set.
41+ all other members of the set.
4242
4343:program:`mongod` uses background threads for a number of internal
4444processes, including :ref:`TTL collections <ttl-collections>`,
@@ -136,7 +136,7 @@ procedure for changing system limits on running systems.
136136``/proc`` File System
137137~~~~~~~~~~~~~~~~~~~~~
138138
139- .. note::
139+ .. note::
140140
141141 This section applies only to Linux operating systems.
142142
@@ -199,6 +199,8 @@ The output of the first command may resemble the following:
199199 Max realtime priority 65 65
200200 Max realtime timeout unlimited unlimited us
201201
202+ .. _oom-killer:
203+
202204Recommended Settings
203205--------------------
204206
@@ -210,9 +212,16 @@ the following thresholds and settings are particularly important for
210212- ``-t`` (cpu time): ``unlimited``
211213- ``-v`` (virtual memory): ``unlimited``
212214- ``-n`` (open files): ``64000``
213- - ``-m`` (memory size): ``unlimited``
215+ - ``-m`` (memory size): ``unlimited`` [#resident-memory-size]_
214216- ``-u`` (processes/threads): ``32000``
215217
216218Always remember to restart your :program:`mongod` and
217219:program:`mongos` instances after changing the ``ulimit`` settings to
218220make sure that the settings change takes effect.
221+
222+ .. [#resident-memory-size] If you limit the resident memory size on a
223+ system running MongoDB you risk allowing the operating system to
224+ terminate the :program:`mongod` process under normal situations. Do
225+ not set this value. If the operating system (i.e. Linux) kills your
226+ :program:`mongod`, with the OOM killer, check the output of
227+ :dbcommand:`serverStatus` and ensure MongoDB is not leaking memory.
0 commit comments