Use of Linux stress testing tool AB (ApacheBenchmark)

Source: Internet
Author: User
ApacheBenchmark (AB) is an apache tool used for HTTPServer testing. It can accept a single URL, load it repeatedly in the way of multiple specified independent threads, and use different command line parameters to control the number of accesses and the maximum number of concurrent threads.

Apache Benchmark (AB) is an apache tool used for HTTP Server testing. It can accept a single URL, and then repeat loading according to the specified multiple independent threads, and use differentCommandThe row parameter controls the number of accesses and the maximum number of concurrent workers.
Sample Code:

// The number of concurrent requests is 5, 1000 in total
Http://www.siteqi.com AB-c5-n1000
// Requests with a concurrency of 5 and a total of 10 seconds
AB-c5-t10 http://www.siteqi.com.


Result Analysis

Document Path: /
Document Length: 29153 bytes

Concurrency Level: 5
/* Duration of the entire test */
Time taken for tests: 7.601 seconds
/* Number of completed requests */
Complete requests: 1000
/* Number of failed requests (many failed requests, which will be analyzed below )*/
Failed requests: 994
(Connect: 0, Receive: 0, Length: 994, Exceptions: 0)
Write errors: 0
/* Network transmission volume in the entire scenario */
Total transferred: 29476875 bytes
/* The amount of HTML content transmitted throughout the scenario */
HTML transferred: 29201875 bytes
/* Average number of requests processed per second (larger, better )*/
Requests per secondd: 131.56 [#/sec] (mean)
/* Average time consumed by a group of requests in each thread */
Time per request: 38.004 [MS] (mean)
/* Average consumption time of concurrent requests */
Time per request: 7.601 [MS] (mean, internal SS all concurrent requests)
/* The average network traffic per second can help eliminate the problem of excessive network traffic resulting in prolonged response time */
Transfer rate: 3787.19 [Kbytes/sec] canceled ed

Connection Times (MS)
Min mean [+/-sd] median max
Connect: 0 0 0.3 0 4
Processing: 13 37 52.2 24 727
Waiting: 4 22 48.3 8 716
Total: 13 37 52.2 24 727
/* The following content shows the responses 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 262 milliseconds, 90% of the user response time is less than 730 milliseconds, and the maximum response time is less than 8504 milliseconds */
Percentage of the requests served within a certain time (MS)
50% 262
66% 327
75% 397
80% 449
90% 730
95% 1338
98% 5224
99% 8504
100% 8504 (longest request)

As Failed requests: 994, why are there so many Failed requests?
The following Connect, Length, and Exception data are displayed, indicating
Connect: the request cannot be sent, the target host request fails, and the connection is interrupted during the request.
Length: The returned Content Length is inconsistent (determined based on Content-Length)
Exception: Unexpected error
Obviously, the website I tested is a dynamic website that returns different lengths of content each time, which will cause Failed requests, so it is negligible.

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.