From 27a946dba366c1cee61e6fd63113ba5d2ee9e451 Mon Sep 17 00:00:00 2001 From: Geert Bosch Date: Fri, 17 Apr 2015 14:53:28 -0400 Subject: [PATCH] WRITING-1287: Give advice on Windows pagefile configuration for MMAPv1 --- source/administration/production-notes.txt | 39 ++++++++++++++++++++-- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/source/administration/production-notes.txt b/source/administration/production-notes.txt index d2a60bf44f4..a1d79f476c8 100644 --- a/source/administration/production-notes.txt +++ b/source/administration/production-notes.txt @@ -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 `. The WiredTiger storage engine also ensures that the operating system does not store MongoDB data in swap space. @@ -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 `_, that repairs a bug in these operating systems' use of memory-mapped files that adversely affects @@ -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 ````````````````````````````