AB Pressure measurement parameter description

Source: Internet
Author: User
Tags response code

AB is an Apache self-brought pressure test tool, very practical. The AB command creates multiple concurrent access threads, simulating multiple visitors accessing a URL address at the same time. Its test target is URL-based, so it can be used to test the load pressure of Apache, as well as other Web servers such as Nginx, Lighthttp, Tomcat, and IIS. The installation of AB is very simple, if the source code installed Apache, it is more simple. After Apache is installed, the AB command is stored in the bin directory of the Apache installation directory, and if Apache is installed via the Yum RPM package, the AB command is stored in the/usr/bin directory by default. If you do not want to install Apache but want to use the AB command, we can directly install the Apache Toolkit httpd-tools, the command is: yum-y install Httpd-tools

AB command format:

./ab [Options] [Http[s]://]hostname[:p ort]/path

Common use methods such as:

 + 20000 http://192.168.99.152/index.php

The above command means: One request 1000, a total of 20,000 requests, the requested address is http://192.168.99.152/index.php

Specific parameter description:

-N number of requests executed in the test session (total)-c Number of requests generated at one time (number of single requests)The maximum number of seconds that the-t test takes. Its internal implied value is-n50000, it can limit the testing of the server to a fixed total time. By default, there is no time limit. -p contains the files that require post data. -P provides a Basic authentication trust for 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). The content-used by the-T post dataType header information. -V Sets the level of detail to display information-4 or greater displays header information, and 3 or greater values can display the response code (404, 200, etc.), 2 or greater can display warnings and other information. -V Displays the version number and exits. -W 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 perform a head request, not a get. -X Settings <table>the string for the property. -X Use a proxy server for the request. -Y settings <tr>the string for the property. -Z Settings <td>the string for the property. -C attaches a cookie to the request: line. The typical form is name=A parameter pair of value, which can be repeated. -H attaches additional header information to the request. A typical form of this parameter is a valid header information row that contains a pair of fields and values separated by colons (for example,"Accept-encoding:zip/zop;8bit"). -a provides a Basic authentication trust to the server. 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). -h Display how to use/help information. -D does not display"percentage served within XX [MS] Table"message (support for previous versions). -E produces a comma-delimited (CSV) file that contains the corresponding percentage (in subtle units) of time that is required to process requests for each corresponding percentage (from 1% to 100%). Since this format has been "binary",'gnuplot'format is more useful. -G writes all test results to a'gnuplot'or a TSV (tab-delimited) file. This file can be easily imported into Gnuplot,idl,mathematica,igor or even Excel. One of the first behavior headings. -I perform a head request, not a get. -K enables the HTTP keepalive feature, which is to execute multiple requests in an HTTP session. By default, the KeepAlive feature is not enabled. -Q If the number of requests processed is greater than 150,ab per processing of approximately 10% or 100 requests, a progress count is output at stderr. This-Q flag can suppress this information.

AB Performance Index:

Several indicators are important in the performance testing process:1, throughput rate (requests per second) server concurrency processing capacity is quantified, in the unit is reqs/s, which refers to the number of requests processed within a unit of time for a concurrent user. The maximum number of requests per unit of time that a concurrent user could process, called the maximum throughput rate. The throughput rate is based on the number of concurrent users. This sentence represents two meanings: A, the throughput rate and the number of concurrent users B, the number of concurrent users, the throughput rate is generally different calculation formula: Total number of requests/processing the time it takes to complete these requests, which is request per Second=complete Requests/time taken fortests must indicate that this value represents the overall performance of the current machine, and the larger the value the better. 2, concurrent connections (the number of concurrent connections) number of concurrent connections refers to the number of requests received by the server at some point, simply speaking, is a session. 3, concurrent users (Concurrency level) to be aware of the difference between this concept and the number of concurrent connections, a user may produce multiple sessions at the same time, that is, the number of connections. In the HTTP/1. 1, IE7 supports two concurrent connections, IE8 supports 6 concurrent connections, FIREFOX3 supports 4 concurrent connections, so accordingly, our number of concurrent users will have to be divided by this cardinality. 4, average user request latency (time per request) Calculation formula: The amount of time it takes to process the completion of all requests/(total number of requests/concurrent users), that is: Time per request=time taken fortests/(Complete requests/Concurrency level)5, average server request latency (time per request:across all concurrent requests) Calculation formula: The amount of time it takes to process the complete number of requests/the total number of requests, that is: Time taken for/Testscomplete requests can see that it is the reciprocal of the throughput rate. At the same time, it is equal to the average user request waiting time/number of concurrent users, that is, time per request/concurrency level

AB Pressure measurement parameter description

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.