Monitor MongoDB's monitoring preferences: Mongostat

Source: Internet
Author: User
Tags bulk insert flush mongodb

Reprint Address: http://blog.csdn.net/gardener_db/article/details/7432888

Mongostat is really very useful, if the DB has an exception, my first reaction is to look at Mongostat.
If it is the operation of the word, drinking coffee, watching mongostat, life is really comfortable ah.

Run very simple,./mongostat--host 10.7.3.97--port 20000

The main details of the column of the meaning (also can refer to./mongostat--help)

Insert: Number of inserts in one second
Query: Number of queries in one second
Update: Number of updates in one second
Delete: Number of deletions in one second
10 simple queries may be faster than a complex query, so the size of the values is not very significant.
But at least you can know if the query is currently being processed, whether it is inserted.
If it is slave, there is always a number before the value, which represents the replicate operation

Getmore: Getmore operation of cursor at query time
Not very useful

Command: Number of commands executed in one second
For example, BULK INSERT, is only considered a command. It doesn't make much sense.
If it is slave, will show two values, local|replicated, through the comparison of these two values, may be able to see the point of the problem.

Flushes: Number of flush in one second
usually 0, or 1, by calculating the interval between two 1, you can get a general idea of how long it takes to flush once.
Flush overhead is great, and if you flush frequently, you may want to find out why.

Mapped
Vsize:
Res:
This and you use top to see the same, mapped, vsize generally do not have big changes, res will slowly rise, if res often suddenly drop, to check if there are other programs crazy eat memory.

Faults:
Don't be frightened by the name, this value is often not 0 under pressure. If it's often not 0, it's time to add memory.

Locked
MongoDB is a read-write lock, which refers to the percentage of time that a write lock lives. This value is too large (often more than 10%), that is the situation.

IDX Miss:
Very important parameter, under normal circumstances, all queries should be indexed, that is, idx miss is 0. If the value here is large, the index is missing.

Qr|qw:queue lengths for clients Waiting (Read|write)
Ar|aw:active Clients (Read|write)
If these two values are large, then the DB is blocked and the DB processing speed is less than the requested speed.
See if there is a lot of slow queries that are expensive. If the query is all right, it is really a heavy load, you need to add the machine.

Netin:network Traffic In-bits
Netout:network Traffic Out-bits
Network bandwidth pressure, General MongoDB, the network will not become a bottleneck

Conn:number of open connections
  MONGODB creates a thread for each connection, and the creation and release of threads are also overhead. Try not to make this a large number.
 
Repl: Server current status
    m  -Master
    sec-secondary
&nb sp;   rec-recovering
    unk-unknown
    slv-slave
  & nbsp; 
Time: Current

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.