Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-4822

Document Settings for All Platforms (i.e. VMware etc)



    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Incomplete
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: manual
    • Labels:
    • Last comment by Customer:



      We have a number of VMWare recommendations to improve the performance and stability of VM instances hosting MongoDB. Implementing these should improve the performance and reliability for your VMWare instances.

      VMWare Memory settings

      • 100% memory reservation
      • Compression is off
      • Ballooning is off

      mongoD caches as much as it can in memory. Therefore it is normal to see 99%+ memory usage all the time (assuming the database is larger than memory). A good host alerts metric to determine if mongoD is out growing the virual machine is the number of hard page faults. Hard page faults force the process to go to disk to get the information it needs and incur a significant performance penalty. Spinning disks and SANS cannot generally support more than 10 page faults/sec. SSDs can generally support up to 10k page faults/sec before there is a signifcant perforamance impact. Note this depends on the specific SSD model disk configuration in question. For the best performance ensure:

      Our recommendation is to reserve sufficient memory in the hypervisor for the MongoDB VMs to ensure the database's working set fits within it. This VMWare guide covers using reservations in VSphere. This also avoid issues with memory overcommitment in your VM (see this doc for more information).

      • Set a 100% reservation for your VM appropriate to your working set for MongoDB

      VMWare enables memory compression (more details on this link) by default, it should be disabled. The instructions to disable memory compression are on this page.

      • Disable memory compression


      • Reserve CPUs
        We recommend 2-4 CPUs per server (the heavier the read load the more CPUs you'll need). Reserve these CPUs. mongoD's write performance is great impacted by latency, having the CPU switched out from undernearth the writing thread can lead to spikes in the write lock.

      Paravirtualized IO drivers for MongoDB VMs

      • Use paravirutalized drivers
        We have seen a significant performance improvement with VMWare VMs hosting MongoDB using paravirtualized IO drivers. If this is available for your VM, please update your configuration to use them.




            allison.moore Allison Reinheimer Moore
            charlie.page@10gen.com Charlie Page
            Last commenter:
            Luke Bonanomi Luke Bonanomi
            0 Vote for this issue
            3 Start watching this issue


              Days since reply:
              6 years, 30 weeks, 2 days ago
              Date of 1st Reply: