title: MongoDB: big size of mapped memory
body: <p>I use Mongo 2.4.9 and I have a replica sets for three nodes.
  I have performed db.serverStatus().mem and see that size of mapped is very high, 47GB:</p>
  
  <pre><code>db.serverStatus().mem
  {
          "bits" : 64,
          "resident" : 266,
          "virtual" : 10149,
          "supported" : true,
          "mapped" : 47402,
          "mappedWithJournal" : 65730
  }
  </code></pre>
  
  <p>Result of db.stats(1024)</p>
  
  <pre><code>{
          "db" : "xxxxx",
          "collections" : 7,
          "objects" : 670488,
          "avgObjSize" : 2890.6140721385023,
          "dataSize" : 1892697,
          "storageSize" : 2273304,
          "numExtents" : 49,
          "indexes" : 42,
          "indexSize" : 399378,
          "fileSize" : 10416128,
          "nsSizeMB" : 16,
          "dataFileVersion" : {
                  "major" : 4,
                  "minor" : 5
          },
          "ok" : 1
  }
  </code></pre>
  
  <p>In megabytes </p>
  
  <pre><code>"dataSize" : 1848mb
  "storageSize" : 2220mb
  "fileSize" : 10172mb
  </code></pre>
  
  <p>WorkingSet info:</p>
  
  <pre><code>"workingSet" : {
           "note" : "thisIsAnEstimate",
           "pagesInMemory" : 152599,
           "computationTimeMicros" : 31143,
           "overSeconds" : 1728
   }
  </code></pre>
  
  <p>Size(Mb) = 152599*4kb -> convert to Mb = 596 Mb</p>
  
  <p>My question is why the size of mapped memory is 4,2 times greater than fileSize and 15159 times greater than the storageSize or dataSize ?
  Mapped memory memory continues to grow slowly.</p>
  
  <p>Note:
  OS: Red Hat Enterprise Linux Server release 5.7 (Tikanga)
  Physical memory: 3892Mb</p>
  
  <p>I read this <a href="http://www.polyspot.com/en/blog/2012/understanding-mongodb-storage/" rel="nofollow">article</a> but still don't understand why the size of mapped memory so large taking into account the enough small size of real data (filesize). </p>
  
  <p>Thanks.</p>