MongoDB Performance Monitoring

Source: Internet
Author: User
Tags mongodb monitoring mongodb performance monitoring

1, Mongostat

To view statistics for a running MongoDB instance

2. MMS (MongoDB monitoring Service)

1) Installation

Rpm-u mongodb-mms-monitoring-agent-2.1.4.51-1.i386.rpm

2) configuration

    • Visit https://mms.mongodb.com/settings
    • Select the appropriate OS under the Monitoring agent and follow the instructions to configure
    • When done, start Mms:service mongodb-mms-monitoring-agent start
    • Then return to the page and go to setup and follow the instructions to configure

3. MongoDB Profile

Like slow queries in MySQL, MongoDB's slow query log feature

Common commands for viewing profiles:

Db.system.profile.find (). Sort ({$natural:-1})--View the latest profile

Db.system.profile.find ({millis:{$gt: +}). Sort ({$natural: -1}). Limit (5)--view execution times greater than 100ms and sort the first 5 rows in reverse order

Main indicators:

    • ResponseLength: Length of query return
    • Nscanned: How many objects were scanned while performing a query operation
    • Nreturned: The result object returned from the query

Analysis:

    • If the nscanned is larger, or nscanned is much larger than nreturned, it means that the database scans many objects to find the target object, so you need to index the query criteria.
    • When the returned result set is large, i.e. the ResponseLength value is large, the performance is degraded, and a second query parameter is added to the Find query to get only the fields that need to be displayed.

4, explain

Execution plan

5, the maximum number of connections

    • Db.serverstatus (). connections;
    • Maximum number of connections to MongoDB = current value + Available value
    • Start-up can add parameter--maxcounts=3000

See:

MongoDB Basic Management Command: http://blog.csdn.net/shirdrn/article/details/7105539

MongoDB Performance article: http://www.cnblogs.com/oubo/archive/2012/02/22/2394666.html

MongoDB Application article: http://www.cnblogs.com/oubo/archive/2012/02/22/2394665.html

MongoDB Foundation article: http://www.cnblogs.com/oubo/archive/2012/02/21/2394663.html

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.