Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 May 2001 09:35:43 +0100
From:      Alex Dyas <ADyas@twowaytv.com>
To:        scott@gerhardt-it.com, freebsd-questions@FreeBSD.ORG
Subject:   RE: Apache Benchmark quandry
Message-ID:  <911D8F660DF6D411B61F00500462BA01775074@exchange.twowaytv.co.uk>

next in thread | raw e-mail | index | archive | help
Scott,

I ran into the same problem investigating this util recently.  I think what
you are seeing is a limit on the number of open network connections for the
machine running Apache.  Try the following with two xterms open to the web
server machine:

<xterm1> ab -n 600 http://localhost/test.html
	<...wait a few seconds...>
<xterm2> natstat -an | grep TIME_WAIT

netstat should show you a large number of network connections in TIME_WAIT
state. Running this command repeatedly over the next minute will show you
that the number of TIME_WAITs will decrease.  As far as I understand it,
when a TCP/IP 'conversation' with the web server has finished the machine
keeps the connection open (TIME_WAIT) for a fixed period of time before
closing them completely.  This behaviour is part of the TCP/IP definition,
although the timeout can be decreased making the connections close more
rapidly.

The ab utility seems to be designed more for brute force bench marking, ie
short bursts of requests, rather than something drawn out over a period of
time which would mimick a live environment more closely.  It shouldn't be
too difficult to script ab to do this.

In a real life situation, a web server in a properly load blanced system
should never see such an 'attack' on it's services.  If you are seeing such
concentrated bursts of traffic you need to think about spreading the load
across more machines, (or making your content less interesting..).

Someone else please feel free to clarify/debunk this.

alex..

> -----Original Message-----
> From: Scott Gerhardt [mailto:scott@gerhardt-it.com]
> Sent: 18 May 2001 06:00
> To: freebsd-questions@FreeBSD.ORG
> Subject: Apache Benchmark quandry
> 
> 
> Hello,
> 
> I keep getting the following errors when running Apache 
> Benchmark "ab".
> 
> I have installed Apache 1.3.19-Mod-SSL from the ports on the latest
> FreeBSD-4.3-RELEASE
> Everything is default.
> 
> I get "server timed out" errors when I run ab with any settings that
> create more than 400 requests i.e. ab -t 10 -c 25
> http://localhost:80/test.html.  If I specify a fixed number of request
> less than 400 everything works ok. The benchmark also works 
> if I use the
> "-k" (keep alive setting).
> 
> I also get "out of buffe"r errors sometimes if I re-run the bechmark.
> 
> The hardware is an Intel PIII 450 with 256MB of RAM
> 
> Any insights appreciated.
> 
> Regards
> 
> Please CC me becuase I am not on the list.
> 
> 	- Scott
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message
> 

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?911D8F660DF6D411B61F00500462BA01775074>