From owner-freebsd-performance@FreeBSD.ORG Sun Jan 28 00:27:25 2007 Return-Path: X-Original-To: freebsd-performance@freebsd.org Delivered-To: freebsd-performance@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E479E16A400 for ; Sun, 28 Jan 2007 00:27:25 +0000 (UTC) (envelope-from dgilbert@daveg.ca) Received: from ox.eicat.ca (ox.eicat.ca [66.96.30.35]) by mx1.freebsd.org (Postfix) with ESMTP id BA71513C48D for ; Sun, 28 Jan 2007 00:27:25 +0000 (UTC) (envelope-from dgilbert@daveg.ca) Received: by ox.eicat.ca (Postfix, from userid 66) id 9C045DB68; Sat, 27 Jan 2007 18:31:06 -0500 (EST) Received: by canoe.dclg.ca (Postfix, from userid 101) id 4F76061C87; Sat, 27 Jan 2007 18:31:06 -0500 (EST) From: David Gilbert MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17851.57530.289212.626682@canoe.dclg.ca> Date: Sat, 27 Jan 2007 18:31:06 -0500 To: Marcelo Gardini do Amaral In-Reply-To: <20070126172739.GE11721@registro.br> References: <1169205068.45b0a74c17e88@www.postino.punto.it> <20070124191725.GC11721@registro.br> <1169713677.45b86a0dbc06d@www.postino.punto.it> <20070126172739.GE11721@registro.br> X-Mailer: VM 7.17 under 21.4 (patch 19) "Constant Variable" XEmacs Lucid Cc: freebsd-performance@freebsd.org, garcol@postino.it Subject: Re: Performance on udp socket 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: Sun, 28 Jan 2007 00:27:26 -0000 To throw my own $0.02, I've been doing testing on an AMD64x2 (multiprocessor) with NSD. I'm using a crazy large domain file and getting around 125k requests/second using one NSD process and 135 requests/second using 2 NSD threads. Dave. -- ============================================================================ |David Gilbert, Independent Contractor. | Two things can be | |Mail: dave@daveg.ca | equal if and only if they | |http://daveg.ca | are precisely opposite. | =========================================================GLO================ From owner-freebsd-performance@FreeBSD.ORG Sat Feb 3 12:42:38 2007 Return-Path: X-Original-To: freebsd-performance@freebsd.org Delivered-To: freebsd-performance@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CC95016A402 for ; Sat, 3 Feb 2007 12:42:38 +0000 (UTC) (envelope-from 000.fbsd@quip.cz) Received: from home.quip.cz (grimm.quip.cz [213.220.192.218]) by mx1.freebsd.org (Postfix) with ESMTP id 8C8B413C461 for ; Sat, 3 Feb 2007 12:42:38 +0000 (UTC) (envelope-from 000.fbsd@quip.cz) Received: from [192.168.1.2] (qwork.quip.test [192.168.1.2]) by home.quip.cz (Postfix) with ESMTP id 1E96A62DF for ; Sat, 3 Feb 2007 13:17:14 +0100 (CET) Message-ID: <45C47D49.4040101@quip.cz> Date: Sat, 03 Feb 2007 13:17:13 +0100 From: Miroslav Lachman <000.fbsd@quip.cz> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 X-Accept-Language: cz, cs, en, en-us MIME-Version: 1.0 To: freebsd-performance@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: PHP Performance problem after upgrade to 5.1.6 or 5.2.0 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: Sat, 03 Feb 2007 12:42:38 -0000 Hi all, I have performance problem with PHP after upgrading from PHP 5.1.4 to newer version regardles if newer version is 5.1.6 or 5.2.0. I tested both with same result. I have two same servers (IBM x336 with dual Xeon 3GHz and 2GB RAM) serving one webapplication (loadbalancing). Both machines are running FreeBSD 6.0 SMP + Apache 2.0.59. If both machines have PHP 5.1.4, everything is fine and load is about 1.5 (Apache is running 16-20 childs). After upgrade to PHP 5.1.6 or 5.2.0, performance goes down - average load is about 3-5 with peaks at 12-40 (in this peaks Apache starts to run more childs, sometimes to MaxClients). Both machines are serving identical content with same requests per second, both versions of PHP are compiled from ports with same options. Both have in loader.conf: accf_data_load="YES" accf_http_load="YES" Older versions of PHP are running fine with Hyperthreading enabled (top shows 4 CPUs), newer versions are worst with Hyperthreading enabled (strange peaks every hour), better with HTT disabled (2 CPUs). All ports on those machines are compiled by portinstall/portupgrade with options from pkgtools.conf: 'www/apache2' => [ 'WITH_KQUEUE_SUPPORT=yes', 'WITHOUT_DAV_MODULES=yes', 'WITHOUT_IPV6=yes', 'WITHOUT_LDAP=yes', 'WITHOUT_PROXY_MODULES=yes', 'WITHOUT_SUEXEC=yes', ], 'lang/php5' => [ 'WITH_CLI=true', 'WITH_CGI=true', 'WITH_APACHE=true', 'WITH_MULTIBYTE=true', 'WITH_MAILHEAD=true', 'WITH_FASTCGI=true', 'WITH_PATHINFO=true', 'WITH_SUHOSIN=true', 'WITHOUT_DEBUG=true', 'WITHOUT_IPV6=true', 'WITHOUT_REDIRECT=true', 'WITHOUT_DISCARD=true', ], After downgrade back to 5.1.4, everything is fine. I have played with it for a long time without success :o( Is there somebody with same problems? Or have anybody some tips to configuration tuning? My co-worker reports performance boost after upgrade to 5.2.0 on Gentoo Linux, so it seems FreeBSD related problem to me. You can see some Zabbix graphs on this link: http://www.quip.cz/1/freebsd/php5-performance/ Used PHP extensions: http://www.quip.cz/1/freebsd/php5-performance/packages_wolf.txt http://www.quip.cz/1/freebsd/php5-performance/packages_imp.txt Imp = machine with PHP 5.1.4 Wolf = machine with PHP 5.2.0 Hel = machine not related to this problem. Let my know if I should provide some more informations. Thanks for any help! Miroslav Lachman From owner-freebsd-performance@FreeBSD.ORG Sat Feb 3 14:29:08 2007 Return-Path: X-Original-To: freebsd-performance@freebsd.org Delivered-To: freebsd-performance@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B54DA16A401 for ; Sat, 3 Feb 2007 14:29:08 +0000 (UTC) (envelope-from ale@seudns.net) Received: from pink.seudns.net (pink.seudns.net [201.54.26.2]) by mx1.freebsd.org (Postfix) with SMTP id 9E0FD13C441 for ; Sat, 3 Feb 2007 14:29:07 +0000 (UTC) (envelope-from ale@seudns.net) Received: (qmail 20870 invoked from network); 3 Feb 2007 14:02:23 -0000 Received: from unknown (HELO ?192.168.100.20?) (192.168.100.20) by pink.seudns.net with SMTP; 3 Feb 2007 14:02:23 -0000 Message-ID: <45C495F1.5030408@seudns.net> Date: Sat, 03 Feb 2007 12:02:25 -0200 From: Alexandre Biancalana User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: Miroslav Lachman <000.fbsd@quip.cz> References: <45C47D49.4040101@quip.cz> In-Reply-To: <45C47D49.4040101@quip.cz> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-performance@freebsd.org Subject: Re: PHP Performance problem after upgrade to 5.1.6 or 5.2.0 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: Sat, 03 Feb 2007 14:29:08 -0000 Miroslav Lachman wrote: > Hi all, > > I have performance problem with PHP after upgrading from PHP 5.1.4 to > newer version regardles if newer version is 5.1.6 or 5.2.0. I tested > both with same result. > I have two same servers (IBM x336 with dual Xeon 3GHz and 2GB RAM) > serving one webapplication (loadbalancing). Both machines are running > FreeBSD 6.0 SMP + Apache 2.0.59. If both machines have PHP 5.1.4, > everything is fine and load is about 1.5 (Apache is running 16-20 > childs). > After upgrade to PHP 5.1.6 or 5.2.0, performance goes down - average > load is about 3-5 with peaks at 12-40 (in this peaks Apache starts to > run more childs, sometimes to MaxClients). > Both machines are serving identical content with same requests per > second, both versions of PHP are compiled from ports with same options. > Both have in loader.conf: > accf_data_load="YES" > accf_http_load="YES" > First of all you should upgrade the FreeBSD to 6.2-STABLE, since this has a LOT of improvements in the overall system. I would recommend you to disable HT too. Regards, From owner-freebsd-performance@FreeBSD.ORG Sat Feb 3 16:20:00 2007 Return-Path: X-Original-To: freebsd-performance@freebsd.org Delivered-To: freebsd-performance@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AC3BB16A401 for ; Sat, 3 Feb 2007 16:20:00 +0000 (UTC) (envelope-from 000.fbsd@quip.cz) Received: from home.quip.cz (grimm.quip.cz [213.220.192.218]) by mx1.freebsd.org (Postfix) with ESMTP id 6496913C4B9 for ; Sat, 3 Feb 2007 16:20:00 +0000 (UTC) (envelope-from 000.fbsd@quip.cz) Received: from [192.168.1.2] (qwork.quip.test [192.168.1.2]) by home.quip.cz (Postfix) with ESMTP id CC3F362DF; Sat, 3 Feb 2007 17:19:58 +0100 (CET) Message-ID: <45C4B62E.6030501@quip.cz> Date: Sat, 03 Feb 2007 17:19:58 +0100 From: Miroslav Lachman <000.fbsd@quip.cz> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 X-Accept-Language: cz, cs, en, en-us MIME-Version: 1.0 To: Alexandre Biancalana References: <45C47D49.4040101@quip.cz> <45C495F1.5030408@seudns.net> In-Reply-To: <45C495F1.5030408@seudns.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-performance@freebsd.org Subject: Re: PHP Performance problem after upgrade to 5.1.6 or 5.2.0 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: Sat, 03 Feb 2007 16:20:00 -0000 Alexandre Biancalana wrote: > Miroslav Lachman wrote: > >> Hi all, >> >> I have performance problem with PHP after upgrading from PHP 5.1.4 to >> newer version regardles if newer version is 5.1.6 or 5.2.0. I tested >> both with same result. >> I have two same servers (IBM x336 with dual Xeon 3GHz and 2GB RAM) >> serving one webapplication (loadbalancing). Both machines are running >> FreeBSD 6.0 SMP + Apache 2.0.59. If both machines have PHP 5.1.4, >> everything is fine and load is about 1.5 (Apache is running 16-20 >> childs). >> After upgrade to PHP 5.1.6 or 5.2.0, performance goes down - average >> load is about 3-5 with peaks at 12-40 (in this peaks Apache starts to >> run more childs, sometimes to MaxClients). >> Both machines are serving identical content with same requests per >> second, both versions of PHP are compiled from ports with same options. >> Both have in loader.conf: >> accf_data_load="YES" >> accf_http_load="YES" >> > > First of all you should upgrade the FreeBSD to 6.2-STABLE, since this > has a LOT of improvements in the overall system. I would recommend you > to disable HT too. Yes, you are right, this is the last project, where I have 6.0, but I have not spare machine to do some testing with 6.2 for this type of usage. Those two are in production and if I turn off one of them, the second can't survive the load. ;o( I can't risk that result would be worse than is. And even if your are right, the problem it self is in PHP version upgrade... Miroslav Lachman From owner-freebsd-performance@FreeBSD.ORG Sat Feb 3 19:25:28 2007 Return-Path: X-Original-To: freebsd-performance@freebsd.org Delivered-To: freebsd-performance@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1B1A316A407 for ; Sat, 3 Feb 2007 19:25:28 +0000 (UTC) (envelope-from tom.hurst@clara.net) Received: from spork.qfe3.net (spork.qfe3.net [212.13.207.101]) by mx1.freebsd.org (Postfix) with ESMTP id D2FBA13C48E for ; Sat, 3 Feb 2007 19:25:27 +0000 (UTC) (envelope-from tom.hurst@clara.net) Received: from [81.104.144.87] (helo=voi.aagh.net) by spork.qfe3.net with esmtp (Exim 4.62 (FreeBSD)) (envelope-from ) id 1HDQBO-0006U7-HI; Sat, 03 Feb 2007 19:04:18 +0000 Received: from freaky by voi.aagh.net with local (Exim 4.66 (FreeBSD)) (envelope-from ) id 1HDQBG-000GZs-BM; Sat, 03 Feb 2007 19:04:10 +0000 Date: Sat, 3 Feb 2007 19:04:10 +0000 From: Thomas Hurst To: Miroslav Lachman <000.fbsd@quip.cz> Message-ID: <20070203190410.GA56203@voi.aagh.net> Mail-Followup-To: Miroslav Lachman <000.fbsd@quip.cz>, freebsd-performance@freebsd.org References: <45C47D49.4040101@quip.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <45C47D49.4040101@quip.cz> Organization: Not much. User-Agent: Mutt/1.5.13 (2006-08-11) Sender: Thomas Hurst Cc: freebsd-performance@freebsd.org Subject: Re: PHP Performance problem after upgrade to 5.1.6 or 5.2.0 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: Sat, 03 Feb 2007 19:25:28 -0000 * Miroslav Lachman (000.fbsd@quip.cz) wrote: > I have performance problem with PHP after upgrading from PHP 5.1.4 to > newer version regardles if newer version is 5.1.6 or 5.2.0. I tested > both with same result. Every time I upgrade PHP and see a performace regregression like this, it's been a result of forgetting to update eAccelerator, or whatever flavour of the year PHP bytecode cache is at the time. If you're sure your cache is loading (i.e. it shows up in phpinfo() and isn't logging errors on startup), you might find it useful to grab backtraces from busy processes (the source tarball includes a .gdbinit that allows you to grab PHP backtraces too, provided you're compiling with debug symbols enabled) to see where they might be spending their time. -- Thomas 'Freaky' Hurst http://hur.st/ From owner-freebsd-performance@FreeBSD.ORG Sat Feb 3 19:40:26 2007 Return-Path: X-Original-To: freebsd-performance@freebsd.org Delivered-To: freebsd-performance@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D80AB16A4A6 for ; Sat, 3 Feb 2007 19:40:26 +0000 (UTC) (envelope-from 000.fbsd@quip.cz) Received: from home.quip.cz (grimm.quip.cz [213.220.192.218]) by mx1.freebsd.org (Postfix) with ESMTP id 94EAC13C441 for ; Sat, 3 Feb 2007 19:40:26 +0000 (UTC) (envelope-from 000.fbsd@quip.cz) Received: from [192.168.1.2] (qwork.quip.test [192.168.1.2]) by home.quip.cz (Postfix) with ESMTP id EF47462DF; Sat, 3 Feb 2007 20:40:24 +0100 (CET) Message-ID: <45C4E528.8000302@quip.cz> Date: Sat, 03 Feb 2007 20:40:24 +0100 From: Miroslav Lachman <000.fbsd@quip.cz> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 X-Accept-Language: cz, cs, en, en-us MIME-Version: 1.0 To: Thomas Hurst References: <45C47D49.4040101@quip.cz> <20070203190410.GA56203@voi.aagh.net> In-Reply-To: <20070203190410.GA56203@voi.aagh.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-performance@freebsd.org Subject: Re: PHP Performance problem after upgrade to 5.1.6 or 5.2.0 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: Sat, 03 Feb 2007 19:40:26 -0000 Thomas Hurst wrote: > * Miroslav Lachman (000.fbsd@quip.cz) wrote: > > >>I have performance problem with PHP after upgrading from PHP 5.1.4 to >>newer version regardles if newer version is 5.1.6 or 5.2.0. I tested >>both with same result. > > > Every time I upgrade PHP and see a performace regregression like this, > it's been a result of forgetting to update eAccelerator, or whatever > flavour of the year PHP bytecode cache is at the time. > > If you're sure your cache is loading (i.e. it shows up in phpinfo() > and isn't logging errors on startup), you might find it useful to grab > backtraces from busy processes (the source tarball includes a .gdbinit > that allows you to grab PHP backtraces too, provided you're compiling > with debug symbols enabled) to see where they might be spending their > time. I am not using any PHP bytecode cache. About one year ago I tried eAccelerator which causes Apache freeze. Now I installed ZendOptimizer and load increased!! by 50% :o( -- Miroslav Lachman From owner-freebsd-performance@FreeBSD.ORG Sat Feb 3 20:55:01 2007 Return-Path: X-Original-To: freebsd-performance@freebsd.org Delivered-To: freebsd-performance@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6099116A403 for ; Sat, 3 Feb 2007 20:55:01 +0000 (UTC) (envelope-from tom.hurst@clara.net) Received: from spork.qfe3.net (spork.qfe3.net [212.13.207.101]) by mx1.freebsd.org (Postfix) with ESMTP id 1C67A13C4A5 for ; Sat, 3 Feb 2007 20:55:01 +0000 (UTC) (envelope-from tom.hurst@clara.net) Received: from [81.104.144.87] (helo=voi.aagh.net) by spork.qfe3.net with esmtp (Exim 4.62 (FreeBSD)) (envelope-from ) id 1HDRuV-0007Sc-Jw for freebsd-performance@freebsd.org; Sat, 03 Feb 2007 20:54:59 +0000 Received: from freaky by voi.aagh.net with local (Exim 4.66 (FreeBSD)) (envelope-from ) id 1HDRuN-000I2k-B2 for freebsd-performance@freebsd.org; Sat, 03 Feb 2007 20:54:51 +0000 Date: Sat, 3 Feb 2007 20:54:51 +0000 From: Thomas Hurst To: freebsd-performance@freebsd.org Message-ID: <20070203205451.GA65239@voi.aagh.net> Mail-Followup-To: freebsd-performance@freebsd.org References: <45C47D49.4040101@quip.cz> <20070203190410.GA56203@voi.aagh.net> <45C4E528.8000302@quip.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <45C4E528.8000302@quip.cz> Organization: Not much. User-Agent: Mutt/1.5.13 (2006-08-11) Sender: Thomas Hurst Subject: Re: PHP Performance problem after upgrade to 5.1.6 or 5.2.0 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: Sat, 03 Feb 2007 20:55:01 -0000 * Miroslav Lachman (000.fbsd@quip.cz) wrote: > I am not using any PHP bytecode cache. Well, if you used one perhaps you'd have enough power to be N+1, not just N going on N-1 ;) > About one year ago I tried eAccelerator which causes Apache freeze. Are you using a threaded MPM? Try using prefork, or worker with mod_fastcgi/mod_fcgid and PHP compiled WITH_FASTCGI. > Now I installed ZendOptimizer and load increased!! by 50% :o( I've never used it, but I gather Zend Optimizer is just an optimizer, not a bytecode cache; without one it will be increasing the cost of compilation (which will still happen each request) and you'd expect load to increase, unless your PHP was very optimizable and ineffecient. Zend probably expect you to use it with commercial pre-compiled PHP apps, or as part of Zend Platform, which does include a cache. Personally I wouldn't bother; if eAccelerator still doesn't work, try Alternative PHP Cache (APC) or XCache. -- Thomas 'Freaky' Hurst http://hur.st/