When doing DB benchmark testing, qps and tps are key indicators for measuring database performance. This article compares two calculation methods available online. Let’s first understand the relevant concepts. Concept introduction:
The terms QPS and TPS are often mentioned in database performance monitoring. The following is a brief introduction to the meaning and calculation methods of QPS and TPS in MySQL databases. 1 QPS: Query per second. Here, QPS refers to the total number of queries executed by MySQL Server per second. The calculation method is as follows: Questions = SHOW GLOBAL STATUS LIKE 'Questions'; Uptime = SHOW GLOBAL STATUS LIKE 'Uptime'; QPS=Questions/Uptime 2 TPS: Transactions per second. The TPS value requested by the client application is obtained in the following way. The calculation method is as follows: Com_commit = SHOW GLOBAL STATUS LIKE 'Com_commit'; Com_rollback = SHOW GLOBAL STATUS LIKE 'Com_rollback'; Uptime = SHOW GLOBAL STATUS LIKE 'Uptime'; TPS=(Com_commit + Com_rollback)/Uptime IOPS: (Input/Output Operations Per Second), which is the number of read and write (I/O) operations per second. It is mostly used in databases and other occasions to measure the performance of random access. The IOPS performance of the storage side is different from the IO on the host side. IOPS refers to how many times the storage can receive access from the host per second. One IO from the host requires multiple accesses to the storage to complete. For example, when the host writes a minimum data block, it also has to go through three steps: "sending a write request, writing data, and receiving a write confirmation", which means three storage end accesses. The main IOPS testing benchmark tools include Iometer, IoZone, FIO, etc., which can be used comprehensively to test the IOPS of the disk under different situations. For application systems, you need to first determine the load characteristics of the data, then select reasonable IOPS indicators for measurement and comparative analysis, and then choose the appropriate storage media and software system based on this. Questions records all select and dml queries since mysqld was started, including the number of show command queries. This is somewhat inaccurate. For example, many databases have monitoring systems running, which perform a show query on the database every 5 seconds to obtain the current database status. These queries are recorded in the QPS and TPS statistics, causing a certain amount of "data pollution". If there are many MyISAM tables in the database, it is more appropriate to use questions for calculation. If there are many InnoDB tables in the database, it is more appropriate to use the com_* data source for calculation. Summarize The above is the full content of this article. I hope that the content of this article will have certain reference learning value for your study or work. Thank you for your support of 123WORDPRESS.COM. If you want to learn more about this, please check out the following links You may also be interested in:
|
<<: How to backup and restore the mysql database if it is too large
>>: Solve the problem of installing Tenda U12 wireless network card driver on Centos7
1. Introduction Oracle has released MySQL 8.0GA. ...
First, I will give you the VMware 14 activation c...
What is k3d? k3d is a small program for running a...
If an index contains (or covers) the values of ...
mysql between boundary range The range of between...
Let me briefly explain the functional scenario: T...
Preface When testing, in order to test the projec...
How to achieve internationalization in React? The...
Table of contents 1 Install Docker in Baota Softw...
mysql efficient query MySQL sacrifices group by t...
This article shares the use of js and jQuery tech...
Knowing which for loop or iterator is right for o...
1. Built-in functions 1. Mathematical functions r...
If I want to make the form non-input-capable, I se...
Dig Introduction: Dig is a tool that queries DNS ...