Web Stress Testing Tools: Http_load, Webbench, AB, Siege use methods _ server Other

Source: Internet
Author: User

Foreword: Often in the network float, where have not get knife? Do site webmaster is not sure which day offended the xx people, apart directly to the DDoS on the up to do you, black you, brother on D die you, encountered such a rogue, there is no way, so often to do their own site to do stress testing, to see the load capacity of the server is a necessary thing.

First, Http_load

The program is very small, after decompression is less than 100K

The http_load is run in parallel multiplexing to test the throughput and load of the Web server. But it's different from most stress testers.

, it can be run in a single process, and generally will not kill the client. You can also test Web site requests for HTTPS classes.

Download Address: http://soft.vpser.net/test/http_load/http_load-12mar2006.tar.gz
Installation is simple
#tar ZXVF http_load-12mar2006.tar.gz
#cd http_load-12mar2006
#make && make Install
Command format: http_load-p Concurrent access Process number-s access time to access the URL file

Arguments can actually be combined freely, and there is no limit to the choice between parameters. Like you wrote Http_load-parallel 5-seconds.

The urls.txt is also possible. Let's give you a brief account of the parameters.
-parallel-P: Meaning is the number of concurrent user processes.
-fetches-F: Meaning is the total number of visits
-rate-P: Meaning is the frequency of access per second
-seconds-S: Meaning is the total access time

Prepare URL file: Urllist.txt, file format is one url,url per line preferably more than 50-100 test results are better. File format

As follows:
Http://hackerfans.com/xxx.html
Http://hackerfans.com/xx.html
For example:

Http_load-p 30-s Urllist.txt
Argument, let's look at the result of running a command to see how it returns.
Command:%./http_load-rate 5-seconds URLs Description performs a 10-second duration test with a frequency of 5 per second.

Fetches, 2 max parallel, 289884 bytes, in 10.0148 seconds5916 mean

Fetches/sec, 28945.5 bytes/secmsecs/connect:28.8932 mean, 44.243 Max, 24.488 Minmsecs/first

-response:63.5362 mean, 81.624 Max, 57.803 minhttp response Codes:code 200--49

Results Analysis:
1. Fetches, 2 max parallel, 289884 bytes, in 10.0148 seconds
Description 49 requests were run in the above test, the maximum number of concurrent processes is 2, the total data transfer is 289884bytes, the time is 10.0148 seconds
2. 5916 mean bytes/connection describes the average amount of data transmitted per connection 289884/49=5916
3. 4.89274 fetches/sec, 28945.5 bytes/sec
Indicates that the response request per second is 4.89274, and the data passed per second is 28945.5 bytes/sec
4. msecs/connect:28.8932 mean, 44.243 max, 24.488 min indicates that the average response time per connection is 28.8932 msecs

, the maximum response time 44.243 msecs, the smallest response time 24.488 msecs
5. msecs/first-response:63.5362 mean, 81.624 max, 57.803 min
6, HTTP response Codes:code 200--49 description of the type of open response page, if 403 of the type too much, it may

Be aware that the system is experiencing bottlenecks.
Special Note:
The main indicator in the test results is the fetches/sec, msecs/connect option, which is the number of queries per second that the server can respond to,

Use this metric to measure performance. It seems to be a bit higher and more persuasive than the Apache AB accuracy rate.
qpt-the number of users per second and response time, per connection response to user times.
The result of the test is mainly to look at these two values. Of course, only these two indicators do not complete the analysis of performance, we also need to the server's

The CPU, the men carries on the analysis, can draw the conclusion

Second, Webbench

Webbench is a Web site stress testing tool under Linux that can simulate up to 30,000 concurrent connections to test the load capacity of a Web site. Download

Address can go to Google search, I give a
Download Address: http://soft.vpser.net/test/webbench/webbench-1.5.tar.gz
This program is smaller, decompression after less than 50K, hehe
Installation is very simple
#tar ZXVF webbench-1.5.tar.gz
#cd webbench-1.5
#make && make Install
Webbench executable files are generated in the current directory and can be directly used

Usage:

webbench-c Concurrency number-t run test time URL
Such as:
Webbench-c 5000-t http://hackerfans.com

Third, AB
AB is a powerful test tool with Apache
With Apache installed,
Use to view the description of it

$./ab
./ab:wrong Number of arguments
Usage:./ab [Options] [http://]hostname[:p Ort]/path
Options are:
-N requests number of requests to perform
-c concurrency number of multiple requests to make
-T TimeLimit Seconds to Max. Wait for responses
-P postfile File containing data to POST
-T Content-type content-type header for POSTing
-V verbosity how much troubleshooting info to print
-W Print out results in HTML tables
-I use head instead of
-X attributes String to insert as table attributes
-Y attributes String to insert as TR attributes
-Z attributes String to insert as TD or TH attributes
-C attribute Add cookie, eg. ' Apache=1234. (repeatable)
-H attribute Add arbitrary header line, eg. ' Accept-encoding:gzip '
Inserted after the all normal header lines. (repeatable)
-A attribute Add Basic WWW authentication, the attributes
are a colon separated username and password.
-P attribute Add Basic Proxy authentication, the attributes
are a colon separated username and password.
-X Proxy:port ProxyServer and port number to use
-V Print version number and exit
-K Use HTTP KeepAlive feature
-D don't show percentiles served table.
-S don't show confidence estimators and warnings.
-G filename Output collected data to gnuplot format file.
-e filename Output CSV file with percentages served
-H Display Usage information (this message)
There are many parameters, generally we use the-N and-C
For example:
./ab-c 1000-n http://hackerfans.com/index.php

This means processing 1000 requests at a time and running 100 index.php files.
Four, siege
an open source pressure testing tool, can be configured to a Web site multiuser concurrent access, record each user all request process corresponding time, and in a certain number of concurrent access to repeat.
Official: http://www.joedog.org/
Siege Download: http://soft.vpser.net/test/siege/siege-2.67.tar.gz
Extract:
# TAR-ZXF Siege-2.67.tar.gz
Enter the Extract directory:
# CD siege-2.67/
Installation:
#./configure; Make
#make Install

Use
Siege-c 200-r 10-f Example.url
-C is the concurrent quantity,-R is the number of repetitions. The URL file is a text, each line is a URL, it will be randomly accessed from inside.

Example.url content:

Http://hackerfans.com
Http://soft.hackerfans.com

Result Description
Lifting the server siege ... done.
transactions:3419263 hits//complete 419,263 processing
availability:100.00%//100.00% success rate
Elapsed time:5999.69 secs//Total time Data transferred:84273.91 MB//Total data transfer 84273.91 MB
Response time:0.37 secs//corresponding spents 1.65 seconds: Show network connection speed
Transaction rat e:569.91 trans/sec//Every second is done 569.91 times: Indicates the
throughput:14.05 mb/sec//Sec data transfer per second
concurrency:213.42//actual maximum concurrency number after server
successful transactions:2564081//number of successful processing
Failed transactions:11//failure processing times
Longest transaction:29.04//per transmission for the longest Time
Shortest transaction:0.00//minimum time spent per transfer

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.