MySQL Key Performance Monitoring (QPS/TPS), qpstps

Source: Internet
Author: User

MySQL Key Performance Monitoring (QPS/TPS), qpstps

Link: http://www.cnblogs.com/chenty/p/5191777.html

During work, you may encounter various database performance tuning. In addition to viewing the execution duration of an SQL statement, you also need to have a better grasp of the overall processing capability of the system.

QPS: Query per second, queries per second

TPS: Transaction per second, Transaction volume per second

These two indicators are frequently asked in actual application. As a project leader, you must always master these important indicators and make adjustments based on the corresponding trends.

 

The specific algorithms for the preceding two indicators are listed as follows:

 

QPS = Queries/Seconds

Queries is the system status value --Total number of queries, Which can be obtained through the show status query.

Seconds is the monitoring time interval, in Seconds

QPS = (Q2-Q1)/10 queries twice every 10 seconds and records Q1 and Q2 to calculate the QPS value.

 

TPS = (Com_commit + Com_rollback)/Seconds

Com_commit is the system status value -- number of transaction commits

Com_rollback is the system status value -- number of transaction rollbacks

Time Difference. calculation rules are the same as QPS.

 

The above is a manual computation, there are a lot of inconvenience, you can consider using the script for automatic computation in the future.

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.