HTTP Performance Test
For Web performance testing, refer to this connection description: http://www.xenoclast.org/doc/benchmark/
1. Httperf
ftp://ftp.hpl.hp.com/pub/httperf/Download
Unzip and then install, execute the program in the SRC directory under the installation directory
./httperf–server 192.168.210.155–port 10002–uri/index.html–rate 300–num-conn 30000–num-call 1–timeout 5*
?? num?calls=_it Specifies the total number of calls to issue on each connection before closing It
?? Num?connsThe total number of connections to create
Httperf:warning:open file limit > fd_setsize; limiting Max. # of open files to Fd_setsize
Maximum Connect Burst length:51
Total: Connections 30000 Requests 30000 replies 30000 Test-duration 100.004 S
Connection Rate: 300.0 conn/s (3.3 ms/conn, <=52 concurrent connections)
Connection Time [MS]: Min 0.5 avg 3.5 Max 113.7 median 3.5 stddev 4.6
Connection Time [MS]: Connect 1.2
Connection Length [Replies/conn]: 1.000
Request Rate: 300.0 req/s (3.3 ms/req)
Request Size [B]: 78.0
Reply Rate [replies/s]: Min 290.2 avg 300.0 Max 309.8 StdDev 3.3 (samples)
Reply Time [MS]: Response 2.3 Transfer 0.1
Reply Size [B]: Header 238.0 content 612.0 footer 0.0 (total 850.0)
Reply Status: 1xx=0 2xx=30000 3xx=0 4xx=0 5xx=0
CPU Time [s]: User 52.07 system 47.29 (user 52.1% system 47.3% total 99.4%)
Net I/o: 271.9 kb/s (2.2*10^6 bps)
Errors: Total 0 Client-timo 0 socket-timo 0 connrefused 0 connreset 0
Errors: fd-unavail 0 addrunavail 0 ftab-full 0 Other 0
Total: Indicates the overall situation
Related statistics for CONNECTION:TCP connections, Connection length may >1 (due to persistent-connections)
Send statistics for request rate:http messages
Reply Rate:time indicates when the first packet is sent to receive the first packet, transfer indicates the time to read the received message
2.autobench
The httperf is encapsulated to not only test the results of one condition, but can continuously increase the amount of test to test the bottleneck of performance.
: http://www.xenoclast.org/autobench/
The default configuration file is as follows:
More autobench.conf
Note : Be sure to copy the configuration file to the user's home directory, so program execution needs to read this file; after installation, the default is/usr/local/etc/autobench.conf
# Autobench Configuration File
# host1, host2
# The hostnames of the servers under test
# Eg. host1 = iis.test.com
# host2 = apache.test.com
host1 = testhost1
host2 = testhost2
# uri1, uri2
# The URI to test (relative to the document root). For a fair comparison
# the files should be identical (although the paths to them may differ on the
# different hosts)
uri1 = /
uri2 = /
# port1, port2
# The port number on which the servers are listening
port1 = 80
port2 = 80
# low_rate, high_rate, rate_step
# The ‘rate‘ is the number of number of connections to open per second.
# A series of tests will be conducted, starting at low rate,
# increasing by rate step, and finishing at high_rate.
# The default settings test at rates of 20,30,40,50...180,190,200
low_rate = 20
high_rate = 200
rate_step = 10
# num_conn, num_call
# num_conn is the total number of connections to make during a test
# num_call is the number of requests per connection
# The product of num_call and rate is the the approximate number of
# requests per second that will be attempted.
num_conn = 5000
num_call = 10
# timeout sets the maximimum time (in seconds) that httperf will wait
# for replies from the web server. If the timeout is exceeded, the
# reply concerned is counted as an error.
timeout = 5
# output_fmt
# sets the output type - may be either "csv", or "tsv";
output_fmt = tsv
## Config for distributed autobench (autobench_admin)
# clients
# comma separated list of the hostnames and portnumbers for the
# autobench clients. No whitespace can appear before or after the commas.
# clients = bench1.foo.com:4600,bench2.foo.com:4600,bench3.foo.com:4600
clients = localhost:4600
Execute Test Command
./autobench–single_host–host1 192.168.210.155–port1 10002–uri1/index.html–quiet–low_rate 20–high_rate 200–rate_st EP 20–num_call 10–num_conn 5000–timeout 5–file RESULTS.TSV
Httperf:warning:open file limit > fd_setsize; limiting Max. # of open files to Fd_setsize
If you do not add parameters, the parameters in the configuration file are used by default
The final result is a TSV-formatted file, which can be drawn using the tool that comes with the 1.10 release, drawing results from gnuplot
Bench2graph takes a TSV format autobench results file, and uses gnuplot to graph the results, producing output in POSTSCRI Pt.
Note the resulting picture format is PostScript
./bench2graph RESULTS-1.TSV Results-1.ps
using Ghostview to open a picture is recommended under Windows
From for notes (Wiz)
List of attachments
HTTP Performance Test