List Info

Thread: PHP Performance problem after upgrade to 5.1.6 or 5.2.0




PHP Performance problem after upgrade to 5.1.6 or 5.2.0
user name
2007-02-03 06:17:13
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/pac
kages_wolf.txt
http://www.quip.cz/1/freebsd/php5-performance/pack
ages_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
_______________________________________________
freebsd-performancefreebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-p
erformance
To unsubscribe, send any mail to
"freebsd-performance-unsubscribefreebsd.org"

Re: PHP Performance problem after upgrade to 5.1.6 or 5.2.0
user name
2007-02-03 08:02:25
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,
_______________________________________________
freebsd-performancefreebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-p
erformance
To unsubscribe, send any mail to
"freebsd-performance-unsubscribefreebsd.org"

Re: PHP Performance problem after upgrade to 5.1.6 or 5.2.0
country flaguser name
Czech Republic
2007-02-03 10:19:58
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
_______________________________________________
freebsd-performancefreebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-p
erformance
To unsubscribe, send any mail to
"freebsd-performance-unsubscribefreebsd.org"

Re: PHP Performance problem after upgrade to 5.1.6 or 5.2.0
country flaguser name
United Kingdom
2007-02-03 13:04:10
* Miroslav Lachman (000.fbsdquip.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/
_______________________________________________
freebsd-performancefreebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-p
erformance
To unsubscribe, send any mail to
"freebsd-performance-unsubscribefreebsd.org"

[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )