Linux: apache optimization (6) - ab stress test of apache

  1. It is necessary to burn in the purchased physical machine ( second-hand )
  2. A stress test on the application before the product is launched
  3. Stress testing of the product itself

Function: Apache comes with the stress testing tool ab, which is very easy to use and can completely simulate various conditions to initiate test requests to the Web server. During the performance adjustment and optimization process, the ab stress testing tool can be used to test the optimization effect. 

Syntax: ab -n total number of requests -c number of concurrent users website URL 

ab -c 10 -n 100 http://192.168.1.1/index.html

This line means handling 100 requests simultaneously and running it 10 times 

 

Important parameters:

Time taken for tests ## Indicates the total time taken for all these requests to be processed.

Failed requests ## Indicates the number of failed requests

Requests per second ## Throughput rate, calculation formula: Complete requests / Time taken for tests

Transfer rate                               ## represents the length of data obtained from the server in unit time for these requests. The calculation formula is: Total trnasferred/Time taken for tests. This statistic well illustrates the demand for export broadband when the server's processing capacity reaches its limit.

Guess you like

Origin blog.csdn.net/w14768855/article/details/135328728