From owner-freebsd-questions Fri May 18 1:38:58 2001 Delivered-To: freebsd-questions@freebsd.org Received: from exchange.twowaytv.co.uk (exchange.twowaytv.co.uk [194.6.2.173]) by hub.freebsd.org (Postfix) with ESMTP id 48E5537B422 for ; Fri, 18 May 2001 01:38:55 -0700 (PDT) (envelope-from ADyas@twowaytv.com) Received: by exchange.twowaytv.co.uk with Internet Mail Service (5.5.2653.19) id ; Fri, 18 May 2001 09:35:47 +0100 Message-ID: <911D8F660DF6D411B61F00500462BA01775074@exchange.twowaytv.co.uk> From: Alex Dyas To: scott@gerhardt-it.com, freebsd-questions@FreeBSD.ORG Subject: RE: Apache Benchmark quandry Date: Fri, 18 May 2001 09:35:43 +0100 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: X-Loop: FreeBSD.ORG 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: ab -n 600 http://localhost/test.html <...wait a few seconds...> 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