[Performance Testing Tool]-apache.pdf

Source: Internet
Author: User

Advantage: The provided test result information is more complete; disadvantage: only one link can be tested at a time

 

Overview:

The full name of AB is apache. It is an HTTP Performance Testing Tool attached to Apache that can simulate multiple concurrent requests at the same time.

 

Installation:

The Apache server kit comes with AB. You only need to install Apache without installing AB. The AB file is located in the directory % apachehome %/bin (%%apachehome.pdf for aapcheche ), you can copy the AB .exe file and use it independently.

 

Basic usage:

Access www.baidu.com and process five concurrent requests at the same time, and run 10 times to access the Baidu homepage. /* Performance test requirements */

XXXXXXXX :~ $ AB-N 10-C 5 http://www.baidu.com/

/* Start Apache AB and send a total of 10 requests (-N 10) to www.baidu.com, 5 requests (-C 5) each time ), that is to say, the request sent to www.baidu.com is divided into two parts. */

 

Operation Result:

This is apachetings, Version 2.3 <$ revision: 655654 $>

Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/

Licensed to the Apache Software Foundation, http://www.apache.org/

 

Benchmarking www.baidu.com (Be patient) ...... done

 

Server Software: BWS/1.0

Server Hostname: www.baidu.com

Server port: 80

Document path :/

Document length: 9777 bytes

Concurrency level: 5/* concurrency */

Time taken for tests: 0.017 seconds/* duration of the entire test */

Complete requests: 10/* number of completed requests */

Failed requests: 2/* Number of failed requests */

(CONNECT: 0, receive: 0, Length: 2, exceptions: 0)

Write errors: 0

Total transferred: 101688 Bytes/* network transmission volume in the entire scenario */

HTML transferred: 97786 Bytes/* The amount of HTML content transmitted throughout the scenario */

 

/* One of the most important indicators is the throughput.

EquivalentTransactions per second, The mean in the following brackets indicates that this is an average value */

Requests per second: 584.39 [#/sec] (mean)/* Number of transactions per second, mean indicates that this is an average */

 

/* Metric 2, which is the most important indicator, refers to the average user request wait time.

EquivalentAverage Transaction Response Time, The mean in the following brackets indicates that this is an average value */

Time per request: 8.556 [MS] (mean)/* contains 5 concurrent request times each time */

 

// The Third Metric that everyone cares about most refers to the average Server Request Processing Time

Time per request: 1.711 [MS] (mean, internal SS all concurrent requests)/* 5 concurrency, where the time of each request */

 

Transfer Rate: 5803.22 [Kbytes/sec] received/* Average network traffic per second, can help eliminate the problem of long response time caused by excessive network traffic */

Connection times (MS)

Min mean [+/-SD] median Max

Connect: 0 0 0.1 0 0 // network connection status

Processing: 5 7 1.6 7 10 // network processing status

Waiting: 4 6 1.6 6 9 // network waiting status

Total: 5 7 1.6 7 10/* The four rows show the decomposition of time consumed on the Network */

Percentage of the requests served within a certain time (MS)

50% 7

66% 7

75% 7

80% 10

90% 10

95% 10

98% 10

99% 10

100% (longest request)/* The content displays the responses of all requests in the entire scenario,

In the scenario, each request has a response time, of which 75% of the user response time is less than 7 milliseconds, and the maximum response time is less than 10 milliseconds */

 

Parameter description:

Http://httpd.apache.org/docs/2.0/programs/ AB .html

-A Auth-UserName: Password
Provide basic authentication information to the server. The user name and password are separated by a ":" and will be sent in base64 encoding format. This string is sent regardless of whether the server needs it (that is, whether the 401 authentication request code is sent.

-C concurrency
The number of requests generated at a time. The default value is one at a time.

-C cookie-name = Value
Append a "Cookie:" header line to the request. The typical form is a parameter pair of name = value. This parameter can be repeated.

-D
The "percentage served within XX [MS] Table" message is not displayed (supported for previous versions ).

-E csv-File
Generate a comma-separated (CSV) file that contains the corresponding percentage time (in microseconds) required to process each corresponding percentage request (from 1% to 100% ). This format has been "binary", so it is more useful than the "gnuplot" format.

-G gnuplot-File
Write all test results to a "gnuplot" or TSV (separated by tab) file. This file can be easily imported to gnuplot, IDL, Mathematica, and excel. The title of the first behavior.

-H
Displays help information about the usage.

-H custom-Header
Append additional header information to the request. A typical form of this parameter is a valid header information line, which contains fields and values separated by colons (for example, "Accept-encoding: Zip/zop; 8bit ").

-I
Execute the head request instead of get.

-K
Enable keepalive to execute multiple requests in an HTTP session. Keepalive is disabled by default.

-N requests
The number of requests executed in the test session. By default, only one request is executed, and the result is meaningless.

-P post-File
A file that contains post data.

-P proxy-auth-UserName: Password
Provides basic authentication information for a transit proxy. The user name and password are separated by a ":" and will be sent in base64 encoding format. This string is sent no matter whether the server needs it (that is, whether or not the 407 proxy authentication request code is sent.

-Q
If the number of requests processed exceeds 150, AB will output a progress count in stderr every time it processes about 10% or 100 requests. This Q mark can block this information.

-S
It is used during compilation (AB-H will tell you) to use SSL-protected HTTPS instead of HTTP. This function is experimental and is not recommended.

-S
The mean value and the standard deviation value are not displayed, and no warning or error message is displayed when the mean value and the mean value are one to two times the standard deviation. By default, the minimum, average, maximum, and other values are displayed. (To support previous versions)

-T timelimit
The maximum number of seconds for testing. The internal implicit value is "-N 50000 ". It limits the server test to a fixed total time. By default, there is no time limit.

-T Content-Type
The "Content-Type" header used for post data.

-V verbosity
Set the details of the displayed information. If the value is 4 or greater, the header information is displayed. If the value is 3 or greater, the response code (404,200, etc.) is displayed. If the value is 2 or greater, the warning and other information are displayed.

-V
Show the version number and exit.

-W

Output results in the form of HTML tables. By default, it is a table of the width of the two columns of the white background.

-X <Table>-attributes

Set the string of the <Table> attribute. This attribute is filled in <Table here>.

-X proxy [: Port]
Use a proxy server for requests.

-Y <tr>-attributes
Set the string of the <tr> attribute.

-Z <TD>-attributes
Set the string of the <TD> attribute.

 

Discussion/Question:

  • The startup time of AB may be delayed. For example, if the execution time is set to 5 seconds (-T 5) and AB-N 1000-C 2-T 5 http://www.baidu.com/, then the duration of the internal testing in execution is the same time taken for tests: 7.657 seconds ". The startup time is 2 seconds.
  • For www.douban.com/test, if there is no failure in the first request, then there will be a failure in the next few requests. Can this be the protection mechanism of the website?

 

Related Article

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.