Understanding results of mongostat
Asked Answered
B

3

12

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
Bazluke answered 22/12, 2011 at 2:51 Comment(0)
P
9

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
Preterhuman answered 22/12, 2011 at 3:52 Comment(0)
A
3

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

Armyn answered 22/12, 2011 at 17:42 Comment(0)
A
3

1) I am on the right page

So mongostat is not really a "live monitor". It's mostly useful for connecting to a specific server and watching for something specific (what's happening when this job runs?). But it's not really useful for tracking performance over time.

Typically, for monitoring the server, you will want to use a tool like Zabbix or Cacti or Munin. Or some third-party server monitor. The MongoDB webiste has a list.

2) what stats I should monitor in production

You should monitor the same basic stats you would monitor on any server:

  1. CPU
  2. Memory
  3. Disk IO
  4. Network traffic

For MongoDB specifically, you will to run db.serverStatus() and track the

  1. opcounters
  2. connections
  3. indexcounters

Note that these are increasing counters, so you'll have to create the correct "counter type" in your monitoring system (Zabbix, Cacti, etc.) A few of these monitoring programs already have MongoDB plug-ins available.

Also note that MongoDB has a "free" monitoring service called MMS. I say "free" because you will be receiving calls from salespeople in exchange for setting up MMS.

Amaurosis answered 23/12, 2011 at 0:29 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.