Skip to content

WRITING-1287: Give advice on Windows pagefile configuration for MMAPv1 #2278

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
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
39 changes: 36 additions & 3 deletions source/administration/production-notes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -308,9 +308,11 @@ Assign swap space for your systems. Allocating swap space can avoid issues
with memory contention and can prevent the OOM Killer on Linux systems
from killing :program:`mongod`.

For the MMAPv1 storage engine, the method :program:`mongod` uses to
map files to memory ensures that the operating system will
never store MongoDB data in swap space.
For the MMAPv1 storage engine, the method :program:`mongod` uses
to map files to memory ensures that the operating system will never
store MongoDB data in swap space. On Windows systems, using MMAPv1
requires extra swap space due to commitment limits. For details,
see :ref:`MongoDB on Windows <production-windows-pagefile>`.

The WiredTiger storage engine also ensures that the operating system
does not store MongoDB data in swap space.
Expand Down Expand Up @@ -538,6 +540,9 @@ MongoDB on Windows
MongoDB 2.6.6 and Later Using MMAPv1
````````````````````````````````````

Install Hotfix
++++++++++++++

Microsoft has released a hotfix for Windows 7 and Windows Server 2008
R2, `KB2731284 <http://support.microsoft.com/kb/2731284>`_, that repairs a bug
in these operating systems' use of memory-mapped files that adversely affects
Expand All @@ -547,6 +552,34 @@ Install this hotfix to obtain significant performance improvements on MongoDB
2.6.6 and later releases in the 2.6 series, which use MMAPv1 exclusively,
and on 3.0 and later when using MMAPv1 as the storage engine.

.. _production-windows-pagefile:

Configure Windows Pagefile For MMAPv1
+++++++++++++++++++++++++++++++++++++

Configure the page file such that the minimum and maximum page file
size are equal and at least 32 GB. Use a multiple of this size if,
during peak usage, you expect concurrent writes to many databases
or collections.

A large page file is needed as Windows requires enough space to
accommodate all regions of memory mapped files made writable during
peak usage, regardless of whether writes actually occur. However,
the page file size does not need to exceed the maximum size of the
database.

The page file is not used for database storage and will not receive
writes during normal MongoDB operation. As such, the page file will not affect
performance, but it must exist and be large enough to
accommodate Windows' commitment rules during peak database use.

.. note::

Dynamic pagefile sizing is too slow to accommodate the rapidly
fluctuating commit charge of an active MongoDB deployment. This can
result in transient overcommitment situations that may lead to
abrupt server shutdown with a VirtualProtect error 1455.

MongoDB 3.0 Using WiredTiger
````````````````````````````

Expand Down