IOPS QPS TPS

IOPS: (Input / Output operations Per Second, both the number of requests per second I / O's)
IOPS refers to how many times per second to store an acceptable access issued by the host, the host of one IO require multiple visits before they can complete memory, disk read and write capabilities mentioned here, such as it 100M per second read, write 50M. This description is data throughput, IOPS refers to is the number of requests per second of I / O. Details expand the number of requests for a file that is read 80M is one I / O request, write data 1K is also an I / O request, so the more appropriate request IOPS higher natural values ​​within a certain period of time to accept, if you want an in-depth look will find that this is only theory only, because the time to read and write 80M 1K require the same request naturally is not the same in addition to the factors seek, data transmission and other considerations of fact a lot, so if IOPS is high enough, then used in the OLTP system will be more suitable. how to get value for IOPS, there are on Linux, Windows a lot of tools after testing, but can not be more than the reference value. If you want to increase IOPS, the traditional program or using the RAID stripe the I / O capabilities promoted in recent years, an SSD is very hot, technical specifications between different vendors are not Do the same, as this metamorphosis like Fusion-IO level can be dry to one million IOPS level. Under normal circumstances with SSD basically meet the needs of a multi-block strip SSD performance is still very fierce, but burn burn there is a multi-life issues.
IOPS of formula IOPS = 1000ms / (seek time + rotational latency)

 

 

QPS (Query Per Second, both requests per second, the number of queries)
Having said IOPS for the database in a very important QPS, this indicator has, but MySQL should pay more attention in all databases. Gets the index value is also very easy to perform status command in MySQL you can see. But this value is a global index in MySQL life cycle, but our system is not busy all the time, then when the system peak QPS and how much, we can forget yourself. when we perform the status of there Questions , although it is also a global index. However, we can query at intervals of one second value, and the two adjacent subtracted, the actual number is accurate every second of the requests are. If MySQL is in a busy state, so we get the value of it can be regarded as MySQL QPS peak response capability.
QPS formula: Questions / Uptime (Uptime into their own definition of the unit of time)

 

 
mysql> show global status like "Questions"; 
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| Questions     | 10    |
+---------------+-------+
1 row in set (0.02 sec)

mysql> show global status like "Uptime";
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| Uptime        | 308   |
+---------------+-------+
1 row in set (0.02 sec)
 

 




TPS a (Transcantion Per Second, both the number of transactions per second)
Well .. As TPS is also an important indicator of the database, but not every MySQL storage engines support transactions. Take InnoDB is so good .TPS mainly related to commit and rollback
TPS=(Commit+Rollback)/Seconds

 

 
mysql> show global status like "Com_commit";
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| Com_commit    | 0     |
+---------------+-------+
1 row in set (0.02 sec)

mysql> show global status like "Com_rollback";
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| Com_rollback  | 0     |
+---------------+-------+
1 row in set (0.01 sec)
 

Guess you like

Origin www.cnblogs.com/ygunoil/p/10954442.html