Analysis of the field meanings of MongoDB Mongostat

Source: Internet
Author: User
Tags bulk insert memory usage

As a real-time monitoring of MongoDB's sharp weapon, Mongostat is definitely a razor, simple and easy to use, however, to carefully analyze the mongostat state, but also a deep understanding of the meaning of each monitoring item.

# mongostatinsert  query update delete getmore command flushes  Mapped  vsize    res    faults locked % idx  miss %     qr|qw  ar|aw  netIn netOut   conn  set    repl     time   *79      87    *0     *0        0   13|0       0       354g  710g     10.2g      9        0          0         0|0    0|0    9k    666k  483&Nbsp;c56...  sec   15:07:17 

The meanings of each item are analyzed below:

INSERTS/S number of insertions per second query/s number of queries per second update/s updates per second

Note: 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/S the getmore operation of the cursor at query time command/s the number of commands per second, in the master-slave system, two values (for example: 80|0) are displayed, representing the number of local | copy commands

Note: The number of commands executed in one second, such as BULK INSERT, is only considered to be a command meaning little. 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.


FLUSHS/S the number of times per second that Fsync data is written to the hard disk.

Note: generally 0, or 1, by calculating the interval between two 1, you can get an overview of how long it takes to flush one time. Flush overhead is great, and if you flush frequently, you may want to find out why.


MAPPED/S all the amount of data being mmap, in megabytes (this is the total data for the last call in Mongostat) vsize virtual memory usage, in megabytes (this is the total data that was last called in Mongostat) Res physical memory usage, in MB (this is Total data that was last called in Mongostat)

Note: 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 whether there are other programs crazy eat memory.


FAULTS/S the number of access failures per second (Linux only), the data is swapped out for physical memory and placed in swap.

Note: Do not exceed 100, otherwise the machine memory is too small, resulting in frequent swap writes. In this case, to upgrade the memory or expansion, under high pressure this value is often not 0. If it's often not 0, it's time to add memory.

Recommended article: http://huoding.com/2011/08/19/107

Locked% Locked time percentage, try to control it below 50%

Note: 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% of the index of the attempt to load the Btree node when a page failure is required.

Note: This is a sample value. If it is too high to consider whether the index is less, very important parameters, under normal circumstances, all queries should be indexed, that is, the idx miss is 0. If the value here is large, the index is missing.


The length of the queue to which the QR client waits to read data from a MongoDB instance. QW the length of the queue that the client waits to write data to the MongoDB instance. The number of active clients that AR performs read operations. The number of active clients that the AW performs write operations on.

Note: 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 The amount of the network traffic, Inbytes, received by the MongoDB instance. This includes traffic from Mongostat itself.netout The amount of network traffic, Inbytes, sent by the MongoDB instance.t He includes traffic from Mongostat itself.

Note: Network bandwidth pressure, General MongoDB, the network will not become a bottleneck


Conn The total number of open connections.

Note: 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.


The name of the set replica set. The replication state of the REPL node.

Note:

M-master

Sec-secondary

Rec-recovering

Unk-unknown

Slv-slave

Time timestamp

Recommended articles; http://www.cnblogs.com/zhuque/archive/2013/03/29/2988577.html



This article is from "a struggling small operation" blog, please be sure to keep this source http://yucanghai.blog.51cto.com/5260262/1705155

Analysis of the field meanings of MongoDB Mongostat

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.