TPS/QPS

There are many people who are confused about the relationship between their TPS and QPS.
The following is the basic query method, and the calculation formula! Thank you for taking it!

MariaDB [(none)]> show global status like 'questions';
+---------------+----------+
| Variable_name | Value |
+---------------+----------+
| Questions | 70991770 |
+---------------+----------+
1 row in set (0.00 sec)

MariaDB [(none)]> show global status like 'uptime';
+---------------+--------+
| Variable_name | Value |
+---------------+--------+
| Uptime | 485352 |
+---------------+--------+
1 row in set (0.00 sec)

Questions/ Uptime
QPS:146

MariaDB [(none)]> show global status like 'com_commit';
+---------------+---------+
| Variable_name | Value |
+---------------+---------+
| Com_commit | 8960761 |
+---------------+---------+
1 row in set (0.00 sec)

MariaDB [(none)]> show global status like 'com_rollback';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| Com_rollback | 117 |
+---------------+-------+
1 row in set (0.00 sec)

MariaDB [(none)]> show global status like 'uptime';
+---------------+--------+
| Variable_name | Value |
+---------------+--------+
| Uptime | 485432 |
+---------------+--------+
1 row in set (0.00 sec)

Com_commit + Com_rollback / Uptime
TPS:18

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324517966&siteId=291194637