Go Web server performance/Stress testing tools Http_load, Webbench, AB, Siege tutorial

Source: Internet
Author: User
Tags vps

Original link: http://www.vpser.net/opt/webserver-test.html

April 13, 2009 Afternoon | VPS Detective

First, Http_load

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

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

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

: 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 number of concurrent access processes-S access time URL file to access

Parameters can be freely combined, 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 explanation of the parameters.
-parallel Shorthand-P: means the number of concurrent user processes.
-fetches abbreviated-F: Meaning total number of accesses
-rate Shorthand-P: meaning the frequency of visits per second
-seconds shorthand-S: meaning Total access time

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

As follows:
Http://www.vpser.net/uncategorized/choose-vps.html
Http://www.vpser.net/vps-cp/hypervm-tutorial.html
Http://www.vpser.net/coupons/diavps-april-coupons.html
Http://www.vpser.net/security/vps-backup-web-mysql.html
For example:

Http_load-p 30-s Urllist.txt
Parameter understanding, let's look at running a command to see its return result
Command:%./http_load-rate 5-seconds The URLs description performed a test that lasted for 10 seconds, with a frequency of 5 per second.

Fetches, 2 max parallel, 289884 bytes, in 10.0148 seconds5916 mean bytes/connection4.89274

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 in the above test run 49 requests, the maximum number of concurrent processes is 2, the total transfer of data is 289884bytes, the run time is 10.0148 seconds
2. 5916 mean bytes/connection shows 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

, maximum response time 44.243 msecs, minimum 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 describes the type of open response page, if the type of 403 is too many, it may

Be aware that the system is experiencing bottlenecks.
Special Instructions:
The main indicators in the test results are fetches/sec, Msecs/connect, which is the number of queries that the server can respond to per second.

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

CPU, men to analyze, to draw conclusions

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
: http://soft.vpser.net/test/webbench/webbench-1.5.tar.gz
This program is smaller, after decompression less than 50K, hehe
Very simple installation
#tar ZXVF webbench-1.5.tar.gz
#cd webbench-1.5
#make && make Install
Generates the Webbench executable file in the current directory, which can be used directly

Usage:

Webbench-c Concurrent number-T run test time URL
Such as:
Webbench-c 5000-t http://www.vpser.net/

Third, AB
AB is a powerful test tool from Apache
Apache has been installed in the general to bring their own,
Usage to view its description

$./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 GET
-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 all normal header lines. (repeatable)
-A attribute Add Basic WWW authentication, the attributes
is a colon separated username and password.
-P attribute Add Basic Proxy authentication, the attributes
is 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 do not show percentiles served table.
-S do not 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://www.vpser.net/index.php

This represents processing 1000 requests at the same time and running the index.php file 100 times.
Iv. Siege
an open-source stress testing tool that allows multiuser concurrent access to a Web site based on configuration, recording the corresponding time for each user's request process, and repeating under a number of concurrent accesses.
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
Go to unzip directory:
# CD siege-2.67/
Installation:
#./configure; Make
#make Install

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

Example.url content:

http://www.licess.cn
Http://www.vpser.net
Http://soft.vpser.net

Result description
Lifting the server siege ... done.
transactions:3419263 hits//completed 419,263 times 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//spents 1.65 seconds: Shows the speed of the network connection
Transaction rate:569.91 trans/sec//569.91 processing per second: indicates the server
throughput:14.05 mb/sec//Average data transfer per second
concurrency:213.42//Actual maximum number of concurrent
Successful transactions:2564081//successful processing times
Failed transactions:11//Failure handling times
Longest transaction:29.04//maximum time spent per transmission
Shortest transaction:0.00//minimum time per transmission

Go Web server performance/Stress testing tools Http_load, Webbench, AB, Siege tutorial

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.