• Disable NUMA or set vm.zone_reclaim_mode to 0 and run mongod instances with node interleaving. See: MongoDB and NUMA Hardware (page 200) for more information. 

• Adjust the ulimit values on your hardware to suit your use case. If multiple mongod or mongos instances are running under the same user, scale the ulimit values accordingly. See: UNIX ulimit Settings (page 287) for more information. 

• Use noatime for the dbPath mount point. 

• Configure sufficient file handles ( fs.file-max ), kernel pid limit ( kernel.pid_max ), and maximum threads per process ( kernel.threads-max ) for your deployment. For large systems, values of 98000, 32768, and 64000 are a good starting point. 

• Ensure that your system has swap space configured. Refer to your operating system’s documentation for details on appropriate sizing. 

• Ensure that the system default TCP keepalive is set correctly. A value of 300 often provides better performance for replica sets and sharded clusters. See: Does TCP keepalive time affect MongoDB Deployments? (page 779) in the Frequently Asked Questions for more information. 

## Windows 

• Consider disabling NTFS “last access time” updates. This is analogous to disabling atime on Unix-like sys- tems. 

## Backups 

• Schedule periodic tests of your back up and restore process to have time estimates on hand, and to verify its functionality. 

## Monitoring 

• Use MongoDB Cloud Manager 119 or Ops Manager, an on-premise solution available in MongoDB Enterprise Advanced 120 or another monitoring system to monitor key database metrics and set up alerts for them. Include alerts for the following metrics: 

– lock percent (for the MMAPv1 storage engine (page 91)) 

– replication lag 

– replication oplog window 

– assertions 

– queues 

– page faults 

• Monitor hardware statistics for your servers. In particular, pay attention to the disk use, CPU, and available disk space. 

In the absence of disk space monitoring, or as a precaution: 

– Create a dummy 4GB file on the storage.dbPath drive to ensure available space if the disk becomes full. 

