MongoDB Documentation, Release 3.0.4 Sharding Journaling: MMAPv1 Storage Engine Hardware Deployments to Cloud Hardware Operating System Configuration Linux • Turn off transparent hugepages and defrag. See Transparent Huge Pages Settings (page 221) for more informa- tion. • Adjust the readahead settings (page 203) on the devices storing your database files to suit your use case. If your working set is bigger that the available RAM, and the document access pattern is random, consider lowering the readahead to 32 or 16. Evaluate different settings to find an optimal value that maximizes the resident memory and lowers the number of page faults. • Use the noop or deadline disk schedulers for SSD drives. • Use the noop disk scheduler for virtualized drives in guest VMs. • Use MongoDB version 2.6.4 or later on systems with high-latency storage, such as Windows Azure, as these versions include performance improvements for those systems. See: Azure Deployment Recommendations 118 for more information. • Windows Azure: Adjust the TCP keepalive ( tcp_keepalive_time ) to 100-120. The default TTL for TCP connections on Windows Azure load balancers is too slow for MongoDB’s connection pooling behavior. – Avoid placing all replica set members on the same SAN, as the SAN can be a single point of failure. – Avoid dynamic memory features, such as memory ballooning, when running in virtual environments. – Ensure that each mongod has provisioned IOPS for its dbPath , or has its own physical drive or LUN. • Use RAID10 and SSD drives for optimal performance. • SAN and Virtualization: • Place the journal on its own low-latency disk for write-intensive workloads. Note that this will affect snapshot- style backups as the files constituting the state of the database will reside on separate volumes. • Ensure that all instances use journaling (page 308). • Use CNAMEs to identify your config servers to the cluster so that you can rename and renumber your config servers without downtime. • Ensure full bidirectional network connectivity between mongod , mongos and config servers. • Use NTP to synchronize the clocks on all components of your sharded cluster. • Place your config servers (page 670) on dedicated hardware for optimal performance in large clusters. Ensure that the hardware has enough RAM to hold the data files entirely in memory and that it has dedicated storage. $^{118}$https://docs.mongodb.org/ecosystem/platforms/windows-azure Chapter 5. Administration 312