Apache AB Overview

Source: Internet
Author: User
Tags server port

First, Apache AB introduction

Apache AB is a small performance test tool under Apache

Second, Apache AB path

How to install Apache under Linux:

1. Yum-installed Apache AB path: cd/usr/sbin/

2. RPM-Installed Apache AB path: Cd/opt/lampp/bin

Third, Apache AB View and use introduction

1. Apache AB View:

[email protected] ~]# cd/opt/lampp/
[[email protected] lampp]# ls
apache2 ctlscript.sh htdocs info licenses manual php releasenotes uninstall
bin docs icons lampp logs modules phpMyAdmin sbin uninstall.dat
Build error img lib man mysql proftpd share var
Cgi-bin etc include libexec manager-linux.run pear Properties.ini temp xampp
[[Email protected] lampp]# CD bin
[[email protected] bin]# ll AB
-rwxr-xr-x. 1 root root 48408 February ab
[[email protected] bin]#./ab→ View Help
./ab:wrong Number of arguments
usage:./ab [Options] [http[s]://]hostname[:p ort]/path→ logo usage
Options are:
-N Requests number of requests to perform→ requests executed
-C concurrency number of multiple requests to makes at a time→ a request

。。。 。。。

。。。 。。。

2, Apache AB use:

[[email protected] bin]#./ab-n 1000-c, http://sports.163.com/
Span style= "font-family: Young Round" >this is Apachebench, Version 2.3 < $Revision: 1528965 $>
copyright 1996 Adam Twiss, Zeus technology Ltd, http://www.zeustech.net/
licensed to the Apache software Foundation, http://www.apache.org/

benchmarking sports.163.com (Be patient)
completed requests
completed requests
completed 300 Requests
completed requests
Completed requests
completed requests
completed requests
completed requests
Span style= "font-family: Young Round" >completed requests
completed-requests< /span>
finished the number of requests  → requests


Server Software:openresty
Server hostname:sports.163.com
Server port:80

Document Path:/
Document length:415744 bytes

Concurrency level:10→10 a concurrency
Time taken for tests:70.788 seconds→10 a concurrent Send 1000 requests (70.788 SECONDS*10/10 concurrency =time per request:707.875 [MS] (mean) → average per Response time of the second request)
Number of complete requests:1000→ requests
Failed requests:0→ number of failed requests

NON-2XX response:0→ Non 2 requests, 2xx HTTP request status code
Total transferred:416130766 bytes
HTML transferred:415744000 bytes
Requests per second:14.13 [#/sec] (mean)
Time per request:707.875 [MS] (mean) → average response times per request
Time per request:70.788 [MS] (mean, across all concurrent requests) → average response time of the server, without sending the request (TPS)
Transfer rate:5740.81 [Kbytes/sec] Received

Connection Times (ms)
min mean (average time-consuming) [+/-SD] (Standard variance) median (median) max (max time)
connect:21 59 21.2 59 352→ Connection Server time consuming (thread pool queuing)
processing:475 646 93.6 635 1744→ request Processing Time
waiting:27 86 69.7 76 713→ wait for processing time
total:527 706 94.0 689 1805→ Average response time per request

Percentage of the requests served within a certain time (MS)
50% 689→50% User response time is less than 689ms
66% 714
75% 728
80% 742
90% 785
95% 855
98% 949
99% 1142
100% 1805 (longest request)

Comparison of performance test results of Apache AB and LoadRunner

Testers use LR to a certain function of a system to test the tps=100, the development of Apache AB test the same system with the same function to derive tps=3000, why use two test tools so much difference?

Others test results and their own test results are not the same, focus on the following:

1, test environment (test environment/development environment);

2, the amount of data;

3, whether the test is the same system function;

4, testing tools are different.

Apache AB only sends a request not received by the server to return results, the status value sent to the server is 200, it is considered that the request was successfully completed

LoadRunner after the request, the server will receive the results (the same reason that the server returned success will have a 2xx status code), this request is counted as the end

When using Apache AB for performance testing, the TPS is largely dependent on the CPU's number of cores, and the performance of the server is tested by Apache AB, and sometimes the test results are significantly different.

Linux top command to see the number of cores in the system CPU

So Apache AB is much faster than LR.

V. When to use Apache AB

1, development test performance will use Apache AB

2. See if the server supports 10W TPS.

Controller should be separate from load generator, if the test needs the number of vu, more than the single-load machine can produce the number of VU, the load machine itself will become a performance bottleneck, this is unreasonable. For example, the load machine memory 512M, a vu accounted for 2.5M, then a single load machine can only produce 200vu, if you need to test 500vu, a controller calls multiple generator, to consider load balancing problems, bandwidth issues.

Vi. How to determine the success of Apache AB request

1. LR can use checkpoints to determine if the request is successful

2. How to determine the success of Apache AB request:

① through this "usage:./ab [Options] [http[s]://]hostname[:p ort]/path→ Identity Usage" command, print out the response information, there is no non-2xx response:0;

② Check that the log state printed by the server is a 2XX/3XX status code.

Apache AB Overview

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.