Apache's AB tool

Source: Internet
Author: User
Tags server port

AB is a tool for Apache to perform an HTTP server stress test. Used to measure the execution efficiency of Apache servers and to detect the number of requests that Apache can process per second.

An example of use is as follows (under Windows)

 -  http://www.baidu.com/

The above command can detect the pressure of the Baidu server, where-N 100 indicates a total of 100 connection requests, while the-c 10 means to maintain 10 concurrent. The test results are as follows and the meanings of the fields are explained below (drift yellow is explained):

This is apachebench, Version 2.3 < $Revision: 1554214 $>copyright 1996 Adam Twiss, Zeus technology LTD, http: Www.zeustech.net/Licensed to the Apache software Foundation, http://www.apache.org/Benchmarking www.baidu.com ( Be patient)   ... done

Server software:bws/1.1# # Server Software name, if it is Apache, it will show is Apache, this field is selected from the HTTP header field of the response headerserver Hostname:www.baidu.com # # Requests the domain name Server Port:80# # Port of the requestdocument Path:/ # This request documents the directory Length:86001bytes # # Response document size of the requested Concurrency level:10# # concurrency, corresponding to the command in the C-TenTime taken for tests:6.901seconds # # The time spent testing complete requests:100# # Number of requests completedFailed Requests:95# # Number of failed requests(Connect:0, receive:0, length:95, exceptions:0) Total Transferred:8696312bytes # # Number of bytes received from the server, including HTTP header HTML transferred:8610757bytes # # Total number of HTML documents received from the server requests per second:14.49[#/sec](mean) # #每秒处理的请求书14. $ = 100/6.901time per request:690.140[Ms](mean) # #单一请求的处理时间 (client-aware time) timesper request:69.014[Ms](Mean,across all concurrent requests) # #每个请求的处理时间 (plus concurrency), focusing on server-side processing power Transfer Rate:1230.55[kbytes/sec]Received# #传输速率

Connection times (ms)
              Min  mean[+/-sd] median   maxconnect:        1   421.1      4    processing:  615 1164.2    3146Waiting:        3  253 765.6 3062    total:  679 1214.4    3151    # #最快的请求响应时间是12ms, longest is 3151ms# # Number of requests received in a given time (percentage) 50%  63ms within 50% of the request has been responded 66% 142 75% 164 80% 3033 90% 3107 95% 3133 98% 3141 99% 3151 100% 3151 (longest request)

Although the AB tool is used by Apache to test for itself, it can also be used to test other versions of the server. Functionally ab more complete, support multiple parameters, pick up a few common introduction.

-K enables KeepAlive, which initiates multiple requests in a single session.  -I initiates a head request instead of a GET request

When other parameters are used, explain it.

I found an error when I tested my simple server for writing:

Benchmarking 127.0.0.1 (Be patient) ... APR_SOCKET_RECV: The remote host forced the shutdown of an existing connection. (730054)

Check the information, you need to add-K parameters to solve.

Apache's AB tool

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.