Performance test: the difference between TPS and QPS

Do tests, various ps, jps, tps, qps, rps, hps, how many do you understand?

In the technical group, the most frequently asked questions are tps and qps. There are similarities and differences. I will briefly talk about my understanding. (Because it is busy, the following part is excerpted from the network)

QPS: Queries Per Second, which means "query rate per second", is the number of queries that a server can respond to per second, and it is stipulated for a specific query server (such as a read-write separate architecture, which is a read server) A measure of how much traffic is processed in time.

TPS: TransactionsPerSecond, which means transactions per second. A transaction refers to a process in which a client sends a request to the server and the server reacts. The client starts timing when sending a request, and ends the timing after receiving a response from the server to calculate the time used and the number of completed transactions.

 

tps, that is, the number of transactions processed per second, each transaction includes the following 3 processes:

  a. The user requests the server

  b. The server's own internal processing (including application server, database server, etc.)

  c. The server returns to the user

  If N can complete these three processes per second, tps is N;

 

qps, if it is a request for a page, forming a tps, but a page request may generate multiple requests to the server (there are many html resources on the page, such as pictures, etc.), the server can count these requests. " Qps ";

         However, today's projects are basically separated from front-end and back-end, and performance is also divided into front-end performance and back-end performance. Usually, the default is back-end performance, that is, server-side performance, that is, stress testing of server-side interfaces

               If it is a pressure test on an interface (single scenario), and no other interface will be requested within this interface, then tps = qps, otherwise, tps ≠ qps

               If it is a pressure test for multiple interfaces (mixed scenes) without a transaction controller, jmeter will count the tps of each interface, and the mixed scene is to test the tps of this scene. Obviously, the tps of the mixed scene cannot be obtained in this way, so , To add a thing controller, the result is the tps of the entire scene.

 

In the jmeter aggregation report, Throughput is used to measure throughput, usually expressed by tps

Source: https://www.cnblogs.com/uncleyong/p/11059556.html

Published 44 original articles · 130 praises · 1.37 million views

Guess you like

Origin blog.csdn.net/gb4215287/article/details/104822881