Webbench for stress testing

Source: Internet
Author: User
Tags benchmark phpinfo

Webbench can simulate up to 30,000 concurrent connections to test the load capacity of the Web site, the personal feel is better than the Apache AB pressure test tools, installation and use is particularly convenient, and very small.

The main is the-t parameter with a relatively cool, the following reference Zhang Yi article:

1. Applicable system: Linux

2. Compile and install:

[[Email protected] ~] $wget http://blog.s135.com/soft/linux/webbench/webbench-1.5.tar.gz
[[Email protected] ~] $tar zxvf webbench-1.5.tar.gz
[[Email protected] ~] $CD webbench-1.5
[[Email protected] ~] $make && make install


3. Use:

[Email protected] webbench-1.5]$ Webbench--help
webbench [option] ... Url
-f|--force Don ' t wait for reply from server.
-r|--reload Send Reload Request-pragma:no-cache.
-t|--time <sec> Run benchmark for <sec> seconds. Default 30.
-p|--proxy <server:port> Use proxy server for request.
-c|--clients <n> Run <n> HTTP clients at once. Default one.
-9|--HTTP09 use http/0.9 style requests.
-1|--HTTP10 use http/1.0 protocol.
-2|--HTTP11 use http/1.1 protocol.
--get use Get Request method.
--head use Head request method.
--options use Options Request method.
--trace use trace request method.
-?| -h|--help this information.
-v|--version Display program version.
# # Tests are used as follows:
[Email protected] webbench-1.5]$ webbench-c 500-t http://127.0.0.1/phpinfo.php
</n></n></server:port></sec></sec>

Parameter description:-C for concurrency number,-T for time (seconds)

4. Examples of test results:

[Email protected] webbench-1.5]$ webbench-c 200-t http://127.0.0.1/phpinfo.php
Webbench-simple Web Benchmark 1.5
Copyright (c) Radim Kolar 1997-2004, GPL Open Source software.

Benchmarking:get http://dev3.smarter.com.cn/index.php
Clients, running Sec.

speed=1294 pages/min, 3221114 bytes/sec.
requests:647 susceed, 0 failed.

For a test example that looks at how many pages are processed per minute, schedule a stress test for 2 hours:
The method is to use the Web bench for the Concurrency stress test, the selected page is phpinfo.php, the concurrent request starts 5, each cycle adds 5 into the second round of the cycle, each cycle lasts 180s, reached the maximum of 200 concurrent when the end. This allows for 2 hours of continuous testing.

[[email protected] webbench-1.5]$ for n in ' seq 5 5 50 '; Do echo-n $n ""; Webbench-c $n-T http://127.0.0.1/phpinfo.php 2>/dev/null | grep Speed | awk ' {print '} ' | Awk-f= ' {print $} '; echo; Done

# you can get the following data:
Clints Pages/min
5 6824
10 6888
15 6849
20 6867
25 6892
30 6865
35 6846
40 6739
45 6699
50 6880
55 6831
60 6861
65 6847
70 6852
75 6818
80 6813
85 6858
90 6825
95 6840
100 6893
100 6871
105 6858
110 6890
115 6866
120 6893
125 6912
130 6857
135 6892
140 6874
145 6868
150 6891
155 6862
160 6893
165 6877
170 6872
175 6899
180 6855
185 6900
190 6882
195 6890
200 6904

Original: http://www.cnblogs.com/wangkangluo1/archive/2012/04/18/2455078.html Summary:

1, the pressure test should be put on the product before the launch, not on-line after

2, testing as far as possible across the public network, rather than the intranet

3, the test concurrency should be gradually increased by small, such as 100 when observing the site load is how much, open whether the process, concurrency 200 is how much, the site is slow when the concurrency is how much, the site will not open when the concurrency is how much

4, should be as far as possible unit testing, such as consumer-to-consumer websites can focus on testing shopping carts, promotional pages, etc., because these pages accounted for the entire site traffic proportion of the larger

Webbench for stress testing

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.