AB (Apache benchmark) pressure test

Source: Internet
Author: User
Tags benchmark server port

Recently used to the next AB, the original written to turn out, paste it out, make a record.

AB (Apache Benchmark) is Apache's own performance testing tool in Apache's Bin directory.

With CMD into Apache's Bin directory, this example takes Apache under Windows as an example.

C:\Program Files\apache Software foundation\apache2.2\bin>

Format: AB [options] [http://]hostname[:p Ort]/path

Parameters:

-N requests number of requests to perform

The number of requests executed in the test session. By default, only one request is executed

-c concurrency number of multiple requests to make

The number of requests produced at one time. The default is one at a time.

-T TimeLimit Seconds to Max. Wait for responses

The maximum number of seconds the test takes. Its internal implied value is-n 50000. It allows you to limit the testing of the server to a fixed total time. By default, there is no time limit.

-P postfile File containing data to POST

A file that contains the data that needs to be post.

-T Content-type content-type header for POSTing

The Content-type header information used by the post data.

-V verbosity how much troubleshooting info to print

Setting the level of detail to display information-4 or greater displays header information, 3 or greater values can display response codes (404, 200, etc.), and 2 or greater values can display warnings and other information. -V Displays the version number and exits.

-W Print out results in HTML tables

Outputs the result in the format of an HTML table. By default, it is a table with a two-column width on a white background.

-I use HEAD instead of GET

Executes the head request instead of get.

-X attributes String to insert as table attributes

//

-Y attributes String to insert as TR attributes

//

-Z attributes String to insert as TD or TH attributes

//

-C attribute Add cookie, eg. ' Apache=1234. (repeatable)

-C Cookie-name=value attach a cookie to the request: line. Its typical form is a parameter pair of Name=value. This parameter can be repeated.

-H attribute Add arbitrary header line, eg. ' Accept-encoding:gzip '

Inserted after all normal header lines. (repeatable)

-A attribute Add Basic WWW authentication, the attributes

is a colon separated username and password.

-P attribute Add Basic Proxy authentication, the attributes

is a colon separated username and password.

-P Proxy-auth-username:password provides a Basic authentication trust to a transit agent. The user name and password are separated by a: and sent in Base64 encoded form. This string is sent regardless of whether the server is required (that is, if the 401 authentication requirement code is sent).

-X Proxy:port ProxyServer and port number to use

-V Print version number and exit

-K Use HTTP KeepAlive feature

-D do not show percentiles served table.

-S do not show confidence estimators and warnings.

-G filename Output collected data to gnuplot format file.

-e filename Output CSV file with percentages served

-H Display Usage information (this message)

-attributes the string that sets the property. There are various statically declared fixed-length buffers in the defect program. In addition, parsing of command-line arguments, the response headers of the server, and other external inputs can be very simple, which may have undesirable consequences. It does not realize the http/1.x completely; Accept only certain ' expected ' response formats. The frequent use of STRSTR (3) can lead to performance problems, that is, you may be testing the performance of AB rather than the server.

A lot of parameters, generally we use the-C and-n parameters can be. For example:

Ab-c 1000-n http://127.0.0.1/index.php

"Under Linux for

./ab-c 1000-n http://127.0.0.1/index.php "

This represents processing 1000 requests at the same time and running the login.jsp file 1000 times.

Ab-c 10-n http://10.14.132.35:8080/cs/user/login.jsp

Under Window for

C:\Program Files\apache Software foundation\apache2.2\bin>ab-c 100-n

The commands under Linux are:

#/usr/local/apache2/bin/ab-c 1000-n http://192.168.1.175:8080/cs/user/login.jsp "

This is apachebench, Version 2.0.41-dev < $Revision: 1.121.2.12 $> apache-2.0

Copyright (c) 1996 Adam Twiss, Zeus technology LTD, http://www.zeustech.net/

Copyright (c) 1998-2002 the Apache software Foundation, http://www.apache.org/

Benchmarking 192.168.1.175 (Be patient) ... done


Server software:apache-coyote/1.1

Platform Apache version

Server hostname:192.168.1.175

Server Host Name

Server port:8080

Server port

Document Path:/cs/user/login.jsp

Test the page document

Document length:7536 bytes

Document size

Concurrency level:100

Concurrency number

Time taken for tests:13.125 seconds

Duration of the entire test

Complete requests:100

Number of requests completed

Failed requests:0

Number of failed requests

Write errors:0

Number of Errors written

Total transferred:788000 bytes

Network traffic in the entire scene

HTML transferred:753600 bytes

The amount of HTML content transferred throughout the scene

Requests per second:7.62 [#/sec] (mean)

One of the most concerned indicators, equivalent to the number of transactions per second in LR, followed by mean in parentheses indicates that this is an average

Time per request:13125.000 [MS] (mean)

Two of the most concerned indicators, equivalent to the average transaction response time in LR, followed by mean in parentheses indicates that this is an average

Time per request:131.250 [MS] (mean, across all CONCU

Average of actual run time per request

Transfer rate:58.63 [Kbytes/sec] Received

Average traffic on the network per second can help eliminate the problem of extended response times due to excessive network traffic

Connection Times (MS)

Min MEAN[+/-SD] Median max

connect:0 102 886.7 16 8875

processing:188 9357 1702.7 9906 10156

Waiting:16 9300 1954.0 9906 10156

total:188 9458 1562.2 9922 11281

Decomposition of time consumed on the network

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

50% 9922

66% 10016

75% 10047

80% 10063

90% 10125

95% 10156

98% 10156

99% 11281

100% 11281 (Longest request)

The response of all requests in the entire scene. Each request in the scene has a response time, where 50% of the user's response time is less than 9922 milliseconds and the maximum response time is less than 11281 milliseconds


This article is from "The House of Discovery" blog, declined reprint!

AB (Apache benchmark) pressure test

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.