Operations Checklist

On this page本页内容

The following checklist, along with the Development Checklist list, provides recommendations to help you avoid issues in your production MongoDB deployment.

Filesystem

Replication

Sharding

Journaling: WiredTiger Storage Engine

Hardware

Deployments to Cloud Hardware

Operating System Configuration

Linux

  • Turn off transparent hugepages. See Transparent Huge Pages Settings for more information.
  • Adjust the readahead settings on the devices storing your database files.

    • For the WiredTiger storage engine, set readahead between 8 and 32 regardless of storage media type (spinning disk, SSD, etc.), unless testing shows a measurable, repeatable, and reliable benefit in a higher readahead value.

      MongoDB commercial support can provide advice and guidance on alternate readahead configurations.

  • If using tuned on RHEL / CentOS, you must customize your tuned profile. Many of the tuned profiles that ship with RHEL / CentOS can negatively impact performance with their default settings. Customize your chosen tuned profile to:

  • Use the noop or deadline disk schedulers for SSD drives.
  • Use the noop disk scheduler for virtualized drives in guest VMs.
  • Disable NUMA or set vm.zone_reclaim_mode to 0 and run mongod instances with node interleaving. See: MongoDB and NUMA Hardware 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 for more information.
  • Use noatime for the dbPath mount point.
  • Configure sufficient file handles (fs.file-max), kernel pid limit (kernel.pid_max), maximum threads per process (kernel.threads-max), and maximum number of memory map areas per process (vm.max_map_count) for your deployment. For large systems, the following values provide a good starting point:

    • fs.file-max value of 98000,
    • kernel.pid_max value of 64000,
    • kernel.threads-max value of 64000, and
    • vm.max_map_count value of 128000
  • 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? 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 systems.
  • Format NTFS disks using the default Allocation unit size of 4096 bytes.

Backups

Monitoring

Load Balancing