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.