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

Need clarification on how to read memory statistics in the UNIX top command

      Source : http://docs.mongodb.org/manual/faq/diagnostics/#how-do-i-read-memory-statistics-in-the-unix-top-command

      How do I read memory statistics in the UNIX top command
      Because mongod uses memory-mapped files, the memory statistics in top require interpretation in a special way. On a large database, VSIZE (virtual bytes) tends to be the size of the entire database. If the mongod doesn’t have other processes running, RSIZE (resident bytes) is the total memory of the machine, as this counts file system cache contents.

      The description of RSIZE is not completely accurate. It can be the total memory size of the machine (less a small fraction) but only if various conditions are met, e.g. workload (read vs write), readahead settings, etc. It is not, however, accurate to state that it counts the file system cache contents as there are cases when data can be in RAM but not accounted for by the mongod process (due to the memory mapping and remapping behavior in the kernel)

            andrew.feierabend@mongodb.com Andrew Feierabend (Inactive)
            ronan.bohan@mongodb.com Ronan Bohan
            0 Vote for this issue
            4 Start watching this issue

              4 years, 40 weeks, 3 days ago