System throughput and QPS / TPS

QPS/TPS

QPS: Queries Per Second means "query per second rate", is a server capable of the appropriate number of queries per second, is a measure of a particular query server within the specified time how much of the processing flow.

TPS: is TransactionsPerSecond acronym, that is, the number of transactions / second. It is the unit of measurement software test results. A transaction is the process of a client sends a request to the server and then the server to respond. The client requests the transmission start timing, end timing after receiving the server response, in order to calculate the time of use and the number of transactions completed.

Tps namely processing transactions per second, includes three steps:

1) the user requests the server

2) the server's own internal processing

3) server returned to the user

These three processes, to complete the N second of these three processes, i.e. Tps is N;

Qps substantially similar to Tps, but the difference is that for the first visit to a page, form a Tps; but once the page request may result in multiple requests to the server, the server for these requests can be included in the "Qps" among .

For example: a page will request access server 3, which intermediate produced only a "T", to produce three "Q" 

System throughput

Swallow a metric system (pressure capacity) and request CPU consumption, external interface, IO and so closely related. Reqeust higher individual consumption on the CPU, in response to the slower external system interface, the slower impact speed, etc. IO, the lower the system throughput, whereas higher.

System throughput several important parameters: QPS (TPS), concurrent, response time

        Per request / number of transactions: QPS (TPS)

        Concurrent: request system simultaneously processed / number of transactions

        Response time: generally the average response time

(Many people will often confuse concurrent and understanding TPS)

Once we understand the meaning of the above three elements, you can figure out the relationship between them:

QPS (TPS) = number of concurrent / or an average response time of concurrent average response time = QPS *


For example: a typical work attendance systems, work at 8 am, 30 minutes 7:30 to 8:00 will log the user's sign-sign system. The company employees 1,000 people, average attendance system to log on each member is 5 minutes. It can be calculated using the following method.
QPS (TPS) = 1000 / ( 30 * 60) transaction / s
average response time of 60 seconds = 5 *
concurrent * = QPS average response time = 1000 / (30 * 60) * (5 * 60) = 166.7

Another example: if the value of the maximum transmission system using Jemert pressure-measurement request 600, the average response time is 9 seconds

= 600 concurrent
average response time of 9 seconds =
QPS (TPS) = number of concurrent / average response time = 600 / 66.67 = 9 transactions / sec

        Is typically determined by a system throughput, number of concurrent two factors QPS (TPS), two values ​​each system has a corresponding limit value, the pressure in the access application scenario, as long as the system reaches a particular maximum value, the system throughput would not increase, if the pressure continues to increase, the throughput of the system but will decline due to system overload of work, context switching, memory and so on other consumption degrade system performance.

 

Reprint:

https://blog.csdn.net/u010889616/article/details/83245695

https://www.cnblogs.com/wangmo/p/8074879.html

 



 

Guess you like

Origin www.cnblogs.com/xulan0922/p/11961198.html