Mailing List Archive

curious ab result when -k option included?
Hello, all.

When I execute ab(apache bentch) to test the varnish performance, I have
found curious result.
If I set -k option which means Keepalive like below, I can't see the
result.

with -k option : Requests per second: 10.96 [#/sec] (mean)
without -k option : Requests per second: 5302 [#/sec] (mean)

ab -k -n 1000 -c 100 http://example.com/images/test.gif

Why this result happens? varnish doesn't support keepalive?


Thanks for your help.

_________________________________________________________________
????? ??? ?? ????? http://phonebuddy.msn.co.kr/
curious ab result when -k option included? [ In reply to ]
"Monty Ree" <chulmin2 at hotmail.com> writes:
> When I execute ab(apache bentch) to test the varnish performance, I
> have found curious result. If I set -k option which means Keepalive
> like below, I can't see the result.
>
> with -k option : Requests per second: 10.96 [#/sec] (mean)
> without -k option : Requests per second: 5302 [#/sec] (mean)
>
> ab -k -n 1000 -c 100 http://example.com/images/test.gif
>
> Why this result happens? varnish doesn't support keepalive?

I see the same symptom; tcpdump shows that ab does not send a new
request after receiving each answer, but waits for the session to time
out and then reconnects. I'm not sure if it's a bug in ab or in
Varnish.

DES
--
Dag-Erling Sm?rgrav
Senior Software Developer
Linpro AS - www.linpro.no
curious ab result when -k option included? [ In reply to ]
Dag-Erling Sm?rgrav <des at linpro.no> writes:
> "Monty Ree" <chulmin2 at hotmail.com> writes:
> > Why this result happens? varnish doesn't support keepalive?
> I see the same symptom; tcpdump shows that ab does not send a new
> request after receiving each answer, but waits for the session to time
> out and then reconnects. I'm not sure if it's a bug in ab or in
> Varnish.

Varnish always responds with HTTP 1.1 (even though ab sends HTTP 1.0
requests) and does not send "Connection: keep-alive" (since that is the
default in HTTP 1.1).

With the attached patch, I get the following results on my laptop:

Concurrency Level: 200
Time taken for tests: 46.386721 seconds
Complete requests: 100000
Failed requests: 0
Write errors: 0
Keep-Alive requests: 100000
Total transferred: 23420240072 bytes
HTML transferred: 23396793740 bytes
Requests per second: 2155.79 [#/sec] (mean)
Time per request: 92.773 [ms] (mean)
Time per request: 0.464 [ms] (mean, across all concurrent requests)
Transfer rate: 493057.66 [Kbytes/sec] received

DES
--
Dag-Erling Sm?rgrav
Senior Software Developer
Linpro AS - www.linpro.no

-------------- next part --------------
A non-text attachment was scrubbed...
Name: varnish-keepalive.diff
Type: text/x-diff
Size: 1121 bytes
Desc: not available
Url : http://projects.linpro.no/pipermail/varnish-misc/attachments/20070724/8f037800/attachment.diff