AB website stress testing and AB stress testing tools

Source: Internet
Author: User

AB website stress testing and AB stress testing tools

Parameters of the AB website stress testing command and Chinese annotations of the output results

Permalink

I used to install APACHE without knowing how to test APACHE performance. Now I have found a test tool. It is the test tool AB (APACHE benchmark) that comes with apache. It is under the bin directory of APACHE.
Format:./AB [options] [http: //] hostname [: port]/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 generated at a time. The default value is one at a time.
-T timelimit Seconds to max. wait for responses
// The maximum number of seconds for testing. The implicit value is-n 50000. It limits the server test to a fixed total time. By default, there is no time limit.
-P postfile File containing data to POST
// File that contains the data to be POST.
-T content-type Content-type header for POSTing
// The Content-type Header used by the POST data.
-V verbosity How much troubleshooting info to print
// Set the details of the display information-4 or a greater value will display the header information, 3 or a greater value can display the response code (404,200, etc ), 2 or a greater value can display warnings and other information. -V displays the version number and exits.
-W Print out results in HTML tables
// Output results in HTML table format. By default, it is a table of the width of the two columns of the white background.
-I Use HEAD instead of GET
// Execute 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 attaches a Cookie to the request: Row. The 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
Are a colon separated username and password.
-P attribute Add Basic Proxy Authentication, the attributes
Are a colon separated username and password.
//-P proxy-auth-username: password provides BASIC authentication trust for a transit proxy. The user name and password are separated by one and 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.
-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: Specifies the attribute string. The defect program contains various static declared fixed-length buffers. In addition, parsing command line parameters, server response headers, and other external inputs is also simple, which may have adverse consequences. It does not fully implement HTTP/1.x; only accept some 'preview' response formats. Frequent use of strstr (3) may cause performance problems, that is, you may be testing the performance of AB rather than the server.

There are many parameters. Generally we can use the-c and-n parameters. For example:

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

This indicates that 1000 requests are processed simultaneously and the index. php file is run 1000 times.
#/Usr/local/xiaobai/apache2054/bin/AB-c 1000-n 1000 http: // 127.0.0.1/index.html. zh-cn.gb2312
This is apachetings, 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 127.0.0.1 (be patient)
Completed100 requests
Completed200 requests
Completed300 requests
Completed400 requests
Completed500 requests
Completed600 requests
Completed700 requests
Completed800 requests
Completed900 requests
Finished 1000 requests


Server Software: Apache/2.0.54
// Platform apache version 2.0.54
Server Hostname: 127.0.0.1
// Server host name
Server Port: 80
// Server port

Document Path:/index.html. zh-cn.gb2312
// Document of the test page
Document Length: 1018 bytes
// Document size

Concurrency Level: 1000
// Concurrency
Time taken for tests: 8.188731 seconds
// Test duration
Complete requests: 1000
// Number of completed requests
Failed requests: 0
// Number of failed requests
Write errors: 0

Total transferred: 1361581 bytes
// Network transmission volume in the entire scenario
HTML transferred: 1055666 bytes
// The amount of HTML content transmitted throughout the scenario
Requests per secondd: 122.12 [#/sec] (mean)
// One of the most important indicators is the number of transactions per second in LR. The mean in the brackets below indicates that this is an average value.
Time per request: 8188.731 [MS] (mean)
// The second indicator that everyone cares most about is equivalent to the average transaction response time in LR. The mean in the brackets below indicates that this is an average value.
Time per request: 8.189 [MS] (mean, internal SS all concurrent requests)
// Average actual running time of each request
Transfer rate: 162.30 [Kbytes/sec] canceled ed
// The average network traffic per second can help eliminate the problem of excessive network traffic resulting in prolonged Response Time

Connection Times (MS)
Min mean [+/-sd] median max
Connect: 4 646 1078.7 89 3291
Processing: 165 992 493.1 938 4712
Waiting: 118 934 480.6 882
Total: 813 1638 1338.9 1093
// Decomposition of the time consumed on the network. The specific algorithms of various data are not very clear.

Percentage of the requests served within a certain time (MS)
50% 1093
66% 1247
75% 1373
80% 1493
90% 4061
95% 4398
98% 5608
99% 7368
100% 7785 (longest request)
// Response of all requests in the entire scenario. Each request has a response time in the scenario. 50% of the user response time is less than 1093 milliseconds, 60% of the user response time is less than 1247 milliseconds, and the maximum response time is less than 7785 milliseconds.

For concurrent requests, the cpu does not actually process them at the same time, but is rotated one by one based on the time slice obtained by each request, therefore, the first Time per request is basically equal to the second Time per request Time multiplied by the number of concurrent requests.

Recommended: http://www.cnblogs.com/roucheng/p/texiao.html

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.