Understanding results of mongostat

josephmisiti picture josephmisiti · Dec 22, 2011 · Viewed 15k times · Source

I am trying to understand the results of mongostat:

example

insert  query update delete getmore command flushes mapped  vsize    res faults locked % idx  
0      2      4      0       0      10       0   976m  2.21g   643m      0      0.1          0       
0      1      0      0       0       4       0   976m  2.21g   643m      0        0          0       
0      0      0      0       0       1       0   976m  2.21g   643m      0        0          0    

I see

mapped - 976m
vsize-2.2.g
res - 643m
  • res - RAM, so ~650MB of my database is in RAM
  • mapped - total size of database (via memory mapped files)
  • vsize - ???

not sure why vsize is important or what exactly it means in this content - im running an m1.large so i have like 400GB of HD space + 8GB of RAM.

Can someone help me out here and explain if

  1. I am on the right page
  2. what stats I should monitor in production

Answer

Nat picture Nat · Dec 22, 2011

This should give you enough information

mapped       - amount of data mmaped (total data size) megabytes
vsize        - virtual size of process in megabytes
res          - resident size of process in megabytes