PHP Performance problem after upgrade to 5.1.6 or 5.2.0
000.fbsd at quip.cz
Sat Feb 3 12:42:38 UTC 2007
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:
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' => [
'lang/php5' => [
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
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:
Used PHP extensions:
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!
More information about the freebsd-performance