From owner-freebsd-performance@FreeBSD.ORG Mon Aug 22 15:04:50 2005 Return-Path: X-Original-To: freebsd-performance@freebsd.org Delivered-To: freebsd-performance@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D542F16A420 for ; Mon, 22 Aug 2005 15:04:50 +0000 (GMT) (envelope-from tuliogs@pgt.mpt.gov.br) Received: from mail.pgt.mpt.gov.br (mail.pgt.mpt.gov.br [200.157.62.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 50A5943D60 for ; Mon, 22 Aug 2005 15:04:49 +0000 (GMT) (envelope-from tuliogs@pgt.mpt.gov.br) Received: from [10.0.0.136] (516e.pgt.mpt.gov.br [10.0.0.136]) by mail.pgt.mpt.gov.br (8.13.1/8.13.1) with ESMTP id j7MF4lA3002766 for ; Mon, 22 Aug 2005 12:04:47 -0300 (BRST) (envelope-from tuliogs@pgt.mpt.gov.br) Message-ID: <4309EA1B.6090108@pgt.mpt.gov.br> Date: Mon, 22 Aug 2005 12:07:07 -0300 From: =?ISO-8859-1?Q?Tulio_Guimar=E3es_da_Silva?= User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: FreeBSD Mailing Lists References: In-Reply-To: Content-Type: multipart/mixed; boundary="------------000408050802020700020706" X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: Slow apache response X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Aug 2005 15:04:51 -0000 This is a multi-part message in MIME format. --------------000408050802020700020706 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit A bit late, but... :) Shane Ambler wrote: >On 18/8/05 12:40 AM, "Shane Ambler" wrote: > >>n 17/8/05 9:43 PM, "Claus Guttesen" wrote: >> >> >>>>Apart from apache there is sendmail and ssh running (and the basics such as >>>>tty's, cron and syslog) >>>>All pages are php. >>>>Any ideas on how I can get response times up? >>>> >>>> >>>Are you running apache 1.3 or 2.0? Is httpd.conf configured *not* to >>>do reverse dns-look-up, 'HostnameLookups Off'. Try setting 'KeepAlive >>>Off' if set to on. >>> >>erver version: Apache/1.3.33 (Unix) >>Server built: Feb 10 2005 12:34:22 >> >>KeepAlive on >>HostnameLookup off >> >>I'll try changing KeepAlive >> >Setting KeepAlive off seemed to make improvements initially but it has >slowed down again (2 hours later) - maybe I need to look at caching? > > Keepalive Off shouldn´t really help much if Apache is not topping the maximum number of processes. For what it seems (to me), the problem is not directly apache-related, but maybe PHP, Mysql or some other "peripheral" system, since CPU and proccess usage is not the bottleneck. Anyway, there are a few tricks I can suggest - excuses if some are too elementary, but these could also help other people: ;) 1) Apache: check "Min/Max SpareServers", "Startservers" (which I guess, from your first message, it´s set to 150) and (important) "MaxClients". If they´re set to reasonable values, then the problem is probably elsewhere; 2) PHP: try varying some settings in phi.ini (usually in /usr/local/etc). Ports intallations suggest tuning "output_buffering" and I would also suggest you to look at memory_limit. It could be also a good idea to enable error logging to figure out if other settings are insufficient; 3) Mysql: there seems to be some performance issues with this one. There´s a not-so-old thread discussing Mysql performance in FBSD compared to Linux, and even though our Mysql usage in FBSD here at work is almost to be ignored, :) there are some good performance tips in there that helped; 4) and, finally, OS&hardware: try to see how much memory is effectively being used and by who; maybe some apps (like PHP) are auto-limiting their memory use. Also, there has been a few issues with I/O in 5.4, specially with RAID and fxp subsystems - e.g.: I just raised by about 20-30% disk transfer rates on a DL380 and by 50% on a ML-110 with Highpoint RR1820A. ;) Don´t the logs show any anormality (massive crashes, timeouts, etc.)? I hope this all could help. Have luck, Tulio G. da Silva --------------000408050802020700020706--