[httperf] Questions related to httperf tool...

Martin Arlitt arlitt at granite.hpl.hp.com
Thu May 13 12:29:55 PDT 2004

On Mon, 10 May 2004, Zarko Coklin wrote:

> It just happened that I came accross "httperf" tool and have few questions:
> 1) Can httperf tool be used to test proxies as well? I hope "server" and
> "port" can be set as proxy's,while uri can be set to indicate web page on
> the actual web server. Will this work?

I don't know what effect this will have on performance, but yes it will
work.  here is an example (you'll need to insert "proxyname",
"proxyport", and "servername").  below the command line are the request
and response headers, and the httperf output that indicates some
statistics about the test.

$ ./httperf --server=<proxyname> --port=<proxyport>
--uri=http://<servername>/ --print-request=header --print-reply=header

SH0:GET http://<servername>/ HTTP/1.1
SH0:User-Agent: httperf/0.8.2
SH0:Host: <proxyname>
SS0: header 76 content 0
RH0:HTTP/1.0 200 OK
RH0:Server: Netscape-Enterprise/6.1 AOL
RH0:Date: Thu, 13 May 2004 18:45:08 GMT
RH0:Last-Modified: Thu, 13 May 2004 18:44:57 GMT
RH0:Expires: Thu, 13 May 2004 18:45:57 GMT
RH0:Cache-Control: private,max-age=60
RH0:Content-Type: text/html
RH0:X-Cache: MISS from <proxyname>
RH0:Proxy-Connection: close
RS0: header 302 content 54696 footer 0
Maximum connect burst length: 0

Total: connections 1 requests 1 replies 1 test-duration 0.568957 s

Connection rate: 1.758 conn/s (568.957 ms/conn, <=1 concurrent connections)
Connection time [ms]: min 566.403 avg 566.403 max 566.403 median 566.500 stddev 0.000
Connection time [ms]: connect 0.294
Connection length [replies/conn]: 1.000000

Request rate: 1.758 req/s (568.957 ms/req)
Request size [B]: 76.000

Reply rate [replies/s]: min 0.000 avg 0.000 max 0.000 stddev 0.000 (0 samples)
Reply time [ms]: response 181.602 transfer 381.785
Min reply time [ms]: response 181.602 transfer 381.785
Max reply time [ms]: response 181.602 transfer 381.785
Reply size [B]: header 302.000 content 54696.000 footer 0.000 (total 54998.000)
Reply status: 1xx=0 2xx=1 3xx=0 4xx=0 5xx=0

CPU time [s]: user 0.164 system 0.332 (user 28.836% system 58.358% total 87.193%)
Net I/O: 94.529 KB/s (0.774386*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

> 2) What is max. call rate (req/sec) that you observed one httperf can
> generate? I guess non-blocking I/O is done through "select", but it must
> have some sort of limitation too. I am using Solaris 8 with 2 CPUs at 1.28MHz
> each :-).

I don't have a Solaris machine to test on, but here is a simple test I
just ran, to give you some idea of what httperf can do.  the client has a
Intel Xeon 2.4GHz cpu.  the server has multiple cpus of the same type.  I
used tux as the web server.  note that httperf is not multi-threaded, so
you would need to run two httperf processes to fully utilize your 2 cpu

I quickly tried a number of simple tests involving pipelined requests for
the same 1KB file.  the following is the highest performance I got without
trying to tune either the client or the server any more than they already
are.  I did modify httperf to print the reply rate every 1 second instead
of every 5.  note that starting up such a high request rate requires a few
seconds to reach peak performance.  please note that I was guessing at the
values to use for number of connections, number of requests/connection,
and burst length (for pipelining requests).  I doubt these are optimal
values, but they do result in decent performance.

if you look at the reply rate below it indicates that httperf is
generating (at least) 40,000 requests per second, as that is approximately
the peak reply rate.

$ ./httperf --server= --uri=/1.html
--num-conns=1000 --num-calls=400 --rate=100 --burst-length=100 --verbose

reply-rate = 39657.5
reply-rate = 39198.2
reply-rate = 39201.0
reply-rate = 39889.4
reply-rate = 40041.1
reply-rate = 40025.9
reply-rate = 40042.5
reply-rate = 39940.6
reply-rate = 39986.9
reply-rate = 39942.1
Maximum connect burst length: 1

Total: connections 1000 requests 400000 replies 400000 test-duration
10.073 s

Connection rate: 99.3 conn/s (10.1 ms/conn, <=14 concurrent connections)
Connection time [ms]: min 26.1 avg 98.3 max 135.8 median 114.5 stddev 34.7
Connection time [ms]: connect 1.2
Connection length [replies/conn]: 400.000
Request rate: 39711.9 req/s (0.0 ms/req)
Request size [B]: 69.0

Reply rate [replies/s]: min 39198.2 avg 39792.5 max 40042.5 stddev 331.9
(10 samples)
Reply time [ms]: response 3.2 transfer 0.0
Reply size [B]: header 243.0 content 1024.0 footer 0.0 (total 1267.0)
Reply status: 1xx=0 2xx=400000 3xx=0 4xx=0 5xx=0

CPU time [s]: user 3.01 system 7.07 (user 29.9% system 70.2% total 100.1%)
Net I/O: 51811.7 KB/s (424.4*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

the peak request rate will obviously vary depending on factors such as the
number of requests per TCP connection, whether pipelining is used or not,

hope this helps.


More information about the httperf mailing list