The AB stress test for Linux

Source: Internet
Author: User
Tags server port

    1. AB command format

      The AB command is placed below the Apache directory bin directory using the following method:

/ab-n 3000-c http://www.local.com/(This is the page address of the server under test)

Where-n represents each concurrency, and-C represents the total number of sent

2. Analysis of test results

[email protected] bin]#/ab-n 3000-c http://www. Local . com/

This is apachebench, Version 2.3 < $Revision: 655654 $>

Copyright 1996 Adam Twiss, Zeus technology LTD, http://www.zeustech.net/

Licensed to the Apache software Foundation, http://www.apache.org/


Benchmarking www.twioo.com (Be patient)

Completed requests

Completed requests

Completed requests

Completed requests

Completed requests

Completed 1800 requests

Completed 2100 Requests

Completed 2400 Requests

Completed 2700 requests

Completed requests

Finished requests



Server software:nginx/0.7.65

Server hostname:www. test.com

Server port:80


Document Path:/# #请求的资源

Document length:50679 Bytes # # #文档返回的长度, excluding the corresponding header


Concurrency level:3000 # # #并发个数

Time taken for tests:30.449 seconds # # #总请求时间

Complete requests:3000 # # #总请求数

Failed requests:0 # # #失败的请求数

Write errors:0

Total transferred:152745000 bytes

HTML transferred:152037000 bytes

requests per second:98.52 [#/sec] (mean) # # #平均每秒的请求数

Time per request:30449.217 [MS] (mean) # # #平均每个请求消耗的时间

Time per request:10.150 [MS] (mean, across all concurrent requests) # # #上面的请求除以并发数

Transfer rate:4898.81 [kbytes/sec] received # # #传输速率


Connection Times (MS)

Min MEAN[+/-SD] Median max

Connect:2 54 27.1 55 98

processing:51 8452 5196.8 7748 30361

waiting:50 6539 5432.8 6451 30064

total:54 8506 5210.5 7778 30436


Percentage of the requests served within a certain time (MS)

50% 7778 # # #50% of requests are completed within 7778Ms

66% 11059

75% 11888

80% 12207

90% 13806

95% 18520

98% 24232

99% 24559

100% 30436 (Longest request)



3, if the use of AB access is his local Web server, using 127.0.0.1 or Web server network card IP address, this is not to go network equipment, can ignore network consumption



4, AB Use some of the problems

A, AB command in the general system above the test, general concurrency can not exceed 1024, in fact, because the system limits the maximum number of files opened per process is 1024, you can use Ulimit-a to view

open Files (-N) 65536 # #这个我系统已经修改过

b,-n can specify a maximum number of requests, but not more than 50,000

C,-v n when n>=2, can display the HTTP request header sent, and the HTTP header and content of the response, do not do this when the stress test


This article is from the "12380959" blog, please be sure to keep this source http://12390959.blog.51cto.com/12380959/1932835

The AB stress test for Linux

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.