Use the AB command on the Apache server for stress testing
AB is a performance testing tool for Apache Hypertext Transfer Protocol (HTTP. It is designed to describe the execution performance of the currently installed Apache, mainly to show how many requests can be processed per second by your installed Apache.
# AB-v shows the basic information.
# AB-n1000-c10 http: // localhost: 81/t. php
This is a basic command
-N1000 indicates that the total number of requests is 1000
-0 indicates that the number of concurrent users is 10.
Parameter description:
Concurrency Level: number of concurrent users;
Time taken for tests: total Time spent on request processing;
Complete requests: Total number of requests;
Failed requests: number of Failed requests;
Total transferred: Total length of all request response data;
HTML transferred: Sum of text data in all request response data;
Requests per second: a data that we are very concerned about. Someone calls it "throughput", Requests per second = Complete requests/Time taken for tests
Time per request: average request wait Time;
Transfer rate: the length of data these requests obtain from the server per unit of time.
# AB-c l-n 10000 http: // 127.0.0.1/index.html