[httperf] Connection: close problem
martin.arlitt at hp.com
Fri Feb 29 06:41:00 PST 2008
I don't know of any way to tell httperf "not to expect to be able to send multiple requests per connection", although it should obey "Connection: close" headers from the server (that said, there are situations such as when pipelining is used and the server has a threshold of more than 1 request per connection but less than the number of requests per session, where requests can be in flight when the "Connection: close" is received).
You can specify "--http-version=1.0" to make httperf only issue one request per connection. However, it will only issue one request per connection, even if the server supports persistent connections.
Could you please send a trace of the request and response headers sent in each of the cases you described (i.e., using --print-request=header and --print-reply=header)? I'd like to understand why httperf is not obeying "Connection: close" headers from the server. You may also want to capture a packet trace with tcpdump so we can see the tcp behavior of each connection (e.g., tcpdump -nn -iX -s0 -w http_trace).
Note that you should be specifying a '\n' at the end of the --add-header option, and that httperf treats this as an arbitrary string, it won't actually initiate the connection close based on this.
Also, for the low-rate tests you are doing, httperf version 0.8 should be fine. However, if you were to test at much higher rates, upgrading would be recommended, as 0.8 has a bug in the session feature; this is fixed in 0.8.1 and beyond.
From: httperf-bounces at napali.hpl.hp.com [mailto:httperf-bounces at napali.hpl.hp.com] On Behalf Of Elliot Temple
Sent: Thursday, February 28, 2008 11:54 PM
To: httperf at napali.hpl.hp.com
Subject: [httperf] Connection: close problem
How do I tell httperf not to expect to be able to send multiple
requests per connection, when using --wsesslog?
I'm getting connreset errors with a server that doesn't support keep-
alive (mongrel). I can get the same results with one that does
(webrick) by adding a header:
httperf --hog --session-cookie --server=10.0.1.196 --port=3000 --
wsesslog=1,0,test/httperf/simple --add-header='Connection: close'
Total: connections 3 requests 5 replies 3 test-duration 90.036 s
Errors: total 2 client-timo 0 socket-timo 0 connrefused 0 connreset 2
Although this is actually much worse -- 90 seconds! In the other case
at least it was fast. I know there is a --num-calls option, but it
doesn't seem to work with --wsesslog, and I don't think it's supposed
to. Instead --wsess documentation says (and i assume this applies to
> Whether a persistent connection is used depends on whether the
> server responds to the first call with a reply that includes a
> ''Connection: close'' header line. If such a line is present,
> separate connections are used.
I checked with curl, and both servers are returning Connection: close
in the header (webrick only when you send connection: close). So
either I am misunderstanding something, or it's not working. Please
I'm running OS X 10.5.2 and my version is httperf-0.8 compiled Feb 18
2008 without DEBUG without TIME_SYSCALLS. I realize .9 is out and I
looked through the changelog and didn't see anything relevant, but I
can upgrade if necessary.
-- Elliot Temple
httperf mailing list
httperf at linux.hpl.hp.com
More information about the httperf