Stress testing method

1. Terminology

1. Response time (RT)

        Response Time (Response Time) refers to the time it takes for the system to respond to a request. The absolute value of the response time does not directly reflect the performance of the software. The performance of the software actually depends on the user's acceptance of the response time. In general stress testing, attention will be paid to the average response time (AvgRT) or the 90% RT (90%RT) .

响应时间 = CPU计算耗时 + CPU等待耗时 + 网络IO耗时 + 磁盘IO耗时

2. Number of concurrencies

        The number of Req/transactions processed by the system simultaneously.

并发数 = QPS * 平均响应时间(AvgRT)

3. Query rate per second (QPS)

        Query Per Second (Query Per Second), the number of query requests that the system can handle per second, that is, the number of queries that a server can respond to per second, is a measure of how much traffic a specific query server handles within a specified time. . There are two calculation formulas:

  • QPS = req/sec = number of requests/second
  • QPS = total number of requests/(total number of processes * request time)

4. Transactions per second (TPS)

        Transactions Per Second, the number of transactions the system can process per second. The process of TPS includes: 客户端请求服务端 -> 服务端内部处理 -> 服务端返回客户端. 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.

5. The difference between QPS and TPS

        A transaction refers to the process in which a client sends a request to the server and the server responds. In this TPS, in order to process the first request, it may trigger multiple subsequent visits to the server to complete the work. Each visit counts as a QPS. Therefore, a TPS may contain multiple QPS.

2. Tools

1、apache-jmeter

2、apache(abs.exe)

Guess you like

Origin blog.csdn.net/hezhanran/article/details/123358913