Apache AB tool stress testing

Source: Internet
Author: User
Tags response code

Apache itself comes with a test tool AB, which is under the bin directory of Apache's installation directory.

How to Use AB:

Usage: AB [Options] [http [s]: //] hostname [: Port]/path

-N indicates the number of requests executed in the test session. By default, only one request is executed.
-C: the number of requests generated at a time. By default
-T indicates the maximum number of seconds for testing.
-V sets the details of the display information.-4 or a greater value indicates the header information. 3 or a greater value indicates the response code (404,200, etc ), 2 or a greater value can display warnings and other information. -V: Zui

The most common parameters are-N and-C, for example:

[email protected]:localhost:/usr/local/apache/bin> ./ab -n1000 -c10 http://localhost/index.php
This is ApacheBench, Version 2.3 <$Revision: 1528965 $>Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/Licensed to The Apache Software Foundation, http://www.apache.org/Benchmarking 192.168.90.222 (be patient)Completed 100 requestsCompleted 200 requestsCompleted 300 requestsCompleted 400 requestsCompleted 500 requestsCompleted 600 requestsCompleted 700 requestsCompleted 800 requestsCompleted 900 requestsCompleted 1000 requestsFinished 1000 requestsServer Software: Boa/0.94.13Server Hostname: 192.168.90.222Server Port: 80Document Path: /Document Length: 41 bytesConcurrency Level: 10Time taken for tests: 0.173 secondsComplete requests: 1000Failed requests: 0Total transferred: 228000 bytesHTML transferred: 41000 bytesRequests per second: 5780.51 [#/sec] (mean)Time per request: 1.730 [ms] (mean)Time per request: 0.173 [ms] (mean, across all concurrent requests)Transfer rate: 1287.07 [Kbytes/sec] receivedConnection Times (ms) min mean[+/-sd] median maxConnect: 0 0 0.2 0 1Processing: 0 1 7.8 1 80Waiting: 0 1 7.3 0 76Total: 0 2 7.7 1 80Percentage of the requests served within a certain time (ms) 50% 1 66% 1 75% 1 80% 1 90% 1 95% 1 98% 2 99% 76 100% 80 (longest request)

 

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.