Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Understanding results of mongostat

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
like image 815
josephmisiti Avatar asked Dec 22 '11 02:12

josephmisiti


People also ask

What is the function of Mongostat?

The mongostat utility provides a quick overview of the status of a currently running mongod or mongos instance. mongostat is functionally similar to the UNIX/Linux file system utility vmstat , but provides data regarding mongod and mongos instances. Run mongostat from the system command line, not the mongo shell.

How to use mongostat command?

To use mongostat , keep your current MongoDB shell connection, and open another terminal window to access your server shell. In the second server shell, run the mongostat command: mongostat -u AdminSammy --authenticationDatabase admin.

How do I stop Mongostat?

You can use the "--rowcount 5" option which will terminate mongostat after the 5th iteration.


2 Answers

Also you can use these mini tools watching mongodb

http://openmymind.net/2011/9/23/Compressed-Blobs-In-MongoDB/

by the way I remembered this great online tool from 10gen

https://mms.10gen.com/user/login

like image 88
halil Avatar answered Oct 13 '22 01:10

halil


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
like image 26
Nat Avatar answered Oct 13 '22 01:10

Nat