title: How do I know if MongoDB needs more CPU/RAM?
body: <p>I have a MongoDB server running on an inexpensive Linux VPS (1 x 2.0GHz CPU and 1GB RAM).</p>
  
  <p>It's been about a day now and the output of <code>db.stats()</code> looks reasonable.</p>
  
  <pre><code>db.stats()
  {
          "db" : "app",
          "collections" : 11,
          "objects" : 2067,
          "avgObjSize" : 238.20416061925496,
          "dataSize" : 492368,
          "storageSize" : 1007616,
          "numExtents" : 18,
          "indexes" : 9,
          "indexSize" : 138992,
          "fileSize" : 16777216,
          "nsSizeMB" : 16,
          "dataFileVersion" : {
                  "major" : 4,
                  "minor" : 5
          },
          "extentFreeList" : {
                  "num" : 5,
                  "totalSize" : 286720
          },
          "ok" : 1
  }
  </code></pre>
  
  <p>I can project the number of days until I exceed my disk space.</p>
  
  <p>I know (from the <a href="http://docs.mongodb.org/manual/faq/fundamentals/#does-mongodb-require-a-lot-of-ram" rel="noreferrer">FAQs</a>) "MongoDB automatically uses all free memory on the machine as its cache."</p>
  
  <ol>
  <li><p>How should I determine whether I need more RAM or CPU capacity?</p></li>
  <li><p>Although it's application dependent, is either RAM or CPU generally more important?</p></li>
  <li><p>Is there anything returned by <code>db.runCommand( { serverStatus: 1, workingSet: 1 } )</code> that I should pay particular attention to?</p></li>
  </ol>