From owner-freebsd-questions@FreeBSD.ORG Thu Jul 19 12:00:49 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 977B516A406 for ; Thu, 19 Jul 2007 12:00:49 +0000 (UTC) (envelope-from freebsd@meijome.net) Received: from sigma.octantis.com.au (ns2.octantis.com.au [207.44.189.124]) by mx1.freebsd.org (Postfix) with ESMTP id 6488A13C4B2 for ; Thu, 19 Jul 2007 12:00:49 +0000 (UTC) (envelope-from freebsd@meijome.net) Received: (qmail 23207 invoked from network); 19 Jul 2007 07:00:48 -0500 Received: from 203-206-233-219.dyn.iinet.net.au (HELO localhost) (203.206.233.219) by sigma.octantis.com.au with (DHE-RSA-AES256-SHA encrypted) SMTP; 19 Jul 2007 07:00:48 -0500 Date: Thu, 19 Jul 2007 22:00:45 +1000 From: Norberto Meijome To: "Michael Vaughn" Message-ID: <20070719220045.7b7e244d@localhost> In-Reply-To: <2f0146460707181512x3841af57l588e4d6e67bd5884@mail.gmail.com> References: <2f0146460707181512x3841af57l588e4d6e67bd5884@mail.gmail.com> X-Mailer: Claws Mail 2.10.0 (GTK+ 2.10.14; i386-portbld-freebsd6.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: FreeBSD 6.2-STABLE && apache 2.2.4 = bad performance. Help! X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2007 12:00:49 -0000 On Wed, 18 Jul 2007 23:12:57 +0100 "Michael Vaughn" wrote: > Hello everyone, > > I am contacting -performance, -questions, and -hackers in the hope someone > helps me troubleshoot a problem with FreeBSD 6.2 and apache 2.2.4 [ responding in questions - removed unnecessary lists] can you please make your php.ini, httpd.conf , enabled extras/* and Include/* available please? what's the output of httpd -V and httpd -l Do you use anything outside of the normal? Any networked file system ? [...] > The problem: > > Right after starting apache, the loads on the server will climb to 10-40's > and the application will become unacceptably slow. This will go on until few > users are using the said application. (note: other servers running older > FreeBSD versions on dual cpus running the same code don't exhibit this > system% problem) top shows more than 60% of the CPU time is spent on system: I would first try to determine if the problem is with your application OR apache+OS+configuration combo you have here. - get rid of your application altogether - does apache behave the same way (without clients hitting it)? If yes, dont worry about your app at all for now - apache shouldn't load your system like this. - If load with no-own-app-and-no-clients is ok, use ab to generate some load on the server , on plain html pages. what happens then? - I am not sure what would the best way to test PHP load...but there may be out there some test framework / standard php applications that can be used as a point of reference... - you can run ktrace httpd -X and start using your app, and see if you get anything interesting in the output > I had to lower MaxClients on apache substancially from 128 to 32, or loads > would quickly go to 40+. (Other servers with dual cpus instead of quad and > apache 1.3 on freebsd 6.0 don't have this problem) something is fishy here , I've had (have? ) Apache boxen (i386 though ) with several hundred children allowed (well, big enough that i had to change the build defaults ), and it works fine. (i am not comparing apps, of course, but the server behaviour is what is interesting) HIH, B _________________________ {Beto|Norberto|Numard} Meijome "The freethinking of one age is the common sense of the next." Matthew Arnold I speak for myself, not my employer. Contents may be hot. Slippery when wet. Reading disclaimers makes you go blind. Writing them is worse. You have been Warned.