MongoDB Documentation, Release 3.0.4 Disk and Storage Systems • The MySQL “swap insanity” problem and the effects of NUMA 62 post, which describes the effects of NUMA on databases. The post introduces NUMA and its goals, and illustrates how these goals are not compatible with production databases. Although the blog post addresses the impact of NUMA for MySQL, the issues for MongoDB are similar. • NUMA: An Overview$^{63}$. Configuring NUMA on Windows On Windows, memory interleaving must be enabled through the machine’s BIOS. Please consult your system documentation for details. Configuring NUMA on Linux When running MongoDB on Linux, you may instead use the numactl command and start the MongoDB programs ( mongod , including the config servers (page 670); mongos ; or clients) in the following manner: numactl --interleave=all <path> where <path> is the path to the program you are starting. Then, disable zone reclaim in the proc settings using the following command: echo 0 > /proc/sys/vm/zone_reclaim_mode To fully disable NUMA behavior, you must perform both operations. For more information, see the Documentation for /proc/sys/vm/*$^{64}$. Swap 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 mongod . For the MMAPv1 storage engine, the method 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 MongoDB on Windows (page 204). The WiredTiger storage engine also ensures that the operating system does not store MongoDB data in swap space. RAID-5 and RAID-6 do not typically provide sufficient performance to support a MongoDB deployment. Avoid RAID-0 with MongoDB deployments. While RAID-0 provides good write performance, it also provides limited availability and can lead to reduced performance on read operations, particularly when using Amazon’s EBS volumes. RAID Most MongoDB deployments should use disks backed by RAID-10. Remote Filesystems With the MMAPv1 storage engine, the Network File System protocol (NFS) is not recom- mended as you may see performance problems when both the data files and the journal files are hosted on NFS. You may experience better performance if you place the journal on local or iscsi volumes. With the WiredTiger storage engine, WiredTiger objects may be stored on remote file systems if the remote file system conforms to ISO/IEC 9945-1:1996 (POSIX.1). Because remote file systems are often slower than local file systems, using a remote file system for storage may degrade performance. If you decide to use NFS, add the following NFS options to your /etc/fstab file: bg , nolock , and noatime . $^{62}$http://jcole.us/blog/archives/2010/09/28/mysql-swap-insanity-and-the-numa-architecture/ $^{64}$http://www.kernel.org/doc/Documentation/sysctl/vm.txt $^{63}$https://queue.acm.org/detail.cfm?id=2513149 201 5.1. Administration Concepts