Home  >  Article  >  The difference and understanding between tps and qps

The difference and understanding between tps and qps

(*-*)浩
(*-*)浩Original
2020-01-07 13:44:4916616browse

The difference and understanding between tps and qps

QPS: Queries Per Second, meaning "query rate per second", is the number of queries a server can respond to per second, which is the number of queries a server can respond to per second. A measure of how much traffic the query server (for example, a read-write separated architecture, is a read server) handles within a specified period of time. (Recommended learning: phpstorm)

TPS: TransactionsPerSecond, which means the number of transactions per second. A transaction refers to a client sending a request to the server and then the server makes a request reaction process. The client starts timing when it sends a request and ends when it receives the server's response to calculate the time used and the number of completed transactions.

Tps is the number of transactions processed per second, including

1) User request to the server

2) The server’s own internal processing

3) The server returns these three processes to the user.

can complete N of these three processes per second, and Tps is N;

Qps is basically similar It is different from Tps, but the difference is that one visit to a page forms one Tps; but one page request may generate multiple requests to the server, and these requests by the server can be counted in "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, which is the performance of the service. Do pressure testing on the end interface

If it is a pressure test on one interface (single scenario), and this interface will not request other interfaces internally, then tps=qps, otherwise, tps≠qps

If you are stress testing multiple interfaces (mixed scenario) without adding a transaction controller, jmeter will count the tps of each interface, and the mixed scenario is to test the tps of this scenario. Obviously, you will not get the mixed scenario in this way. tps, so after adding a thing controller, the result is the tps of the entire scene.

The above is the detailed content of The difference and understanding between tps and qps. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn