Http: // your_web_server/your_php_app.php
./AB-n 1000-c 50 http://www.domain.com/myapp.php
At the same time, AB will send 50 concurrent requests to http://www.domain.com/myapp.php, with a total of requests.
The test results may be as follows:
Server Software: Apache/2.0.16
Server Hostname: localhost
Server Port: 80
Document Path:/myapp. php
Document Length: 1311 bytes
Concurrency Level: 50
Time taken for tests: 8.794 seconds
Complete requests: 1000
Failed requests: 0
Total transferred: 1754000 bytes
HTML transferred: 1311000 bytes
Requests per second: 113.71
Transfer rate: 199.45 kb/s converted Ed
Connection Times (MS)
Min avg max
Connect: 0 0 5
Processing: 111 427 550
Total: 111 427 555
Myapp. php processes 113.71 requests per second. Increase the number of requests to see if the server can handle more pressure. You also need to adjust parameters such as MaxClients, ThreadsPerChild, and MaxThreadsPerChild of Apache based on the MPM module in your httpd. conf file.
If you want more detailed information, go to www.apache.org for more in-depth documents, including modules and third-party efficiency improvement tools. After modifying httpd. conf, restart the Apache server and then use AB for testing. The number of requests per second increases or decreases.
Write down the parameters each time, and finally select the configuration with the best efficiency.
Besides AB, we also have many excellent server performance testing software. In addition, if your server is not Apache, please find a test method by yourself.