From owner-freebsd-questions@FreeBSD.ORG Fri May 4 09:56:58 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 BC7A416A401; Fri, 4 May 2007 09:56:58 +0000 (UTC) (envelope-from o.greve@axis.nl) Received: from smtp.interstroom.nl (smtp1.interstroom.nl [80.85.129.3]) by mx1.freebsd.org (Postfix) with ESMTP id 54C4613C459; Fri, 4 May 2007 09:56:58 +0000 (UTC) (envelope-from o.greve@axis.nl) Received: from 5571fe44.ftth.concepts.nl ([85.113.254.68]:49452 helo=[192.168.1.102]) by smtp.interstroom.nl with esmtpsa (TLS-1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.63) (envelope-from ) id 1HjuWb-00050o-Ut; Fri, 04 May 2007 11:56:31 +0200 In-Reply-To: References: <2BEB30C2-C9C5-43AB-9DCA-5C9A1B0AC2C0@axis.nl> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <8DDF332E-A03A-44DC-A87B-D64EC6B91E5A@axis.nl> Content-Transfer-Encoding: 7bit From: Olaf Greve Date: Fri, 4 May 2007 11:56:17 +0200 To: Ivan Voras , Dan Nelson X-Mailer: Apple Mail (2.752.3) Cc: freebsd-questions@freebsd.org, freebsd-amd64@freebsd.org Subject: Re: How to make Apache (2.2.4) less greedy, or Sendmail less polite? 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: Fri, 04 May 2007 09:56:58 -0000 Hi Ivan and Dan (and the lists), >The size of apache processes is telling me you're using PHP or some other heavy apache module. Indeed I am (I forgot to mention this). It is PHP 4.4.6, and it is set up as an Apache module. > If so, you can switch to using PHP as FastCGI responder via mod_fcgid. The benefits are that you'll get only a few number of > large php-cgi processes (configurable, usually around 10), and the rest will be lighter httpd processes for serving static > content. Will that not have some other downsides? I remember that previously when running PHP on the CGI, that e.g. a lot of debugging power got lost, as each and every error would simply either return a blank page, or simply an "internal servor error 500" or so.... Is that also the case with FastCGI? >BUT, if something else changed when you switched to the new apache (e.g. PHP version, your web applications), it may not be >apache's fault. The PHP version got upgraded from 4.4.0 to 4.4.6 too, but none of the actual application scripts changed. BTW: At times what one sees happening is that 2 of the httpd daemons quickly go up to (each, or in turn) about 50% (or 70% if it can grab that much), then stays quite a while at that, and then goes back to a more reasonable amount. At other times, there are around 10+ httpd processes that each consume around 5% of the CPU, with a lot more of them using around 0-1% of the CPU (perhaps defunct already?). Dunno. Apache + PHP is lightning fast, but... at the expense of the CPU being pulled close to 100% all to easily... Then, regarding Dan's sendmail configuration suggestion: tnx! I just put that in place and will monitor sendmail's behaviour today, to see how it performs during heavy server load. I'll let you guys know how I get on with this... Meanwhile: I'm still open for suggestions as to how to best make Apache behave less selfishly. Cheers! Olafo