The Ab.exe (apachebench) program in the Apache Bin directory is designed for use in stress testing software. Apachebench (AB) is used to test Apache execution efficiency, specifically to perform the performance of the website server, especially for Apache Web server, which was originally used to detect the performance of Apache Web server. In particular, Apache can tell how many pages can be sent per second.
Examples of AB use:
Usage:/usr/sbin/ab [Options] [http[s]://]hostname[:p Ort]/path
AB has a number of parameters, commonly used are:
-N: Total number of requests executed, default is 1;
-C: Concurrency number, default is 1;
-p:post data files;
-W: Outputs the result in the format of an HTML table.
The following is a 100 concurrent 500 accesses to an address at the command line (test results are output to the C-drive test2.html, and each output is cumulative).
C:\apache24\bin>ab-n 500-c 100-w http://127.0.0.1:8080/bpmv8.0/r?wf_num=D_S00
5_j012 >>c:\test2.html
Completed requests
Completed requests
Completed requests
Completed requests
Completed requests
Finished requests
The output of the HTML results is as follows:
Server Software (servers name): |
apache-coyote/1.1 |
Server Hostname (servers domain name): |
127.0.0.1 |
Server port: |
8080 |
Document path (Request path): |
/bpmv8.0/r?wf_num=d_s005_j012 |
Document Length (HTTP response body size): |
5876 bytes |
Concurrency level (number of concurrent users): |
100 |
Time taken for tests (Total Request processing completed): |
13.525 seconds |
Complete requests (total requests): |
600 |
Failed requests (number of failed requests): |
0 |
Total transferred (response data length for all requests): |
3673200 bytes |
HTML transferred (response data body length for all requests): |
3525600 bytes |
Requests per second (throughput rate): |
44.36 |
Transfer rate (Request the length of data from the server within a unit of time): |
271581.45 KB/S Received |
Connnection Times (MS) |
|
min |
avg |
Max |
Connect: |
0 |
0 |
16 |
Processing: |
827 |
2164 |
3120 |
Total: |
827 |
2164 |
3136 |
Apache AB pressure test tool