Re: PHP with open_basedir performance problem

2008-03-01 Thread Arkadi Shishlov
Stanislav Sedov wrote: On Thu, Feb 14, 2008 at 07:22:46PM +0200 Arkadi Shishlov mentioned: Stanislav Sedov wrote: Most basedir problems are linked with the fact it produce a lot of lstast/ readlinks on every require, include or open command. On Linux it pereforms even worse, as they implemented

Re: PHP with open_basedir performance problem

2008-02-27 Thread Stanislav Sedov
On Thu, Feb 14, 2008 at 07:22:46PM +0200 Arkadi Shishlov mentioned: > Stanislav Sedov wrote: >> I'd suggest you to disable open_basedir at all or roll out specialized >> implementation. I had a lot of similar problems with open_basedir in >> the past, so I just rewrote it to match our specific secu

Re: PHP with open_basedir performance problem

2008-02-14 Thread Arkadi Shishlov
Stanislav Sedov wrote: I'd suggest you to disable open_basedir at all or roll out specialized implementation. I had a lot of similar problems with open_basedir in the past, so I just rewrote it to match our specific security policy. Can you share a hint how exactly this specialized implementati

Re: PHP with open_basedir performance problem

2008-02-14 Thread Stanislav Sedov
On Mon, Jan 28, 2008 at 03:23:52PM +0100 Miroslav Lachman mentioned: > > Does somebody have any other ideas? > I'd suggest you to disable open_basedir at all or roll out specialized implementation. I had a lot of similar problems with open_basedir in the past, so I just rewrote it to match our s

Re: PHP with open_basedir performance problem

2008-01-28 Thread Alexey Popov
Hi Miroslav Lachman wrote: I tried sysctl vfs.ufs.dirhash_maxmem=1024 and realpath_cache_size=512k in php.ini and sysctl vfs.lookup_shared=1 but all without any significant impact on performance with open_basedir enabled. CPU states: 8.1% user, 0.0% nice, 88.6% system, 0.2% interrupt,

Re: PHP with open_basedir performance problem

2008-01-28 Thread Miroslav Lachman
Antony Mawer wrote: On 28/01/2008 6:52 PM, Alexey Popov wrote: The problem is that concurrent lstat()'s are very slow on FreeBSD now. Possibly you can decrease the number of lstat() calls by tuning realpath cache size in PHP. Just add "realpath_cache_size=512k" to php.ini. However I'm not s

Re: PHP with open_basedir performance problem

2008-01-28 Thread Antony Mawer
On 28/01/2008 6:52 PM, Alexey Popov wrote: The problem is that concurrent lstat()'s are very slow on FreeBSD now. Possibly you can decrease the number of lstat() calls by tuning realpath cache size in PHP. Just add "realpath_cache_size=512k" to php.ini. However I'm not sure this cache is used

Re: PHP with open_basedir performance problem

2008-01-28 Thread Alexey Popov
The problem is that concurrent lstat()'s are very slow on FreeBSD now. Possibly you can decrease the number of lstat() calls by tuning realpath cache size in PHP. Just add "realpath_cache_size=512k" to php.ini. However I'm not sure this cache is used in open_basedir. See the following thread

Re: PHP with open_basedir performance problem

2008-01-27 Thread Hugo Silva
Hugo Silva wrote: Hugo Silva wrote: Miroslav Lachman wrote: Hi all, I found a painful performance problem with Apache + PHP 5 when open_basedir directive is enabled. Application performance drops by more than 50% with open_basedir enabled. There is also significant disproportion between usr /

Re: PHP with open_basedir performance problem

2008-01-27 Thread Hugo Silva
Hugo Silva wrote: Miroslav Lachman wrote: Hi all, I found a painful performance problem with Apache + PHP 5 when open_basedir directive is enabled. Application performance drops by more than 50% with open_basedir enabled. There is also significant disproportion between usr / sys CPU load. (sy

Re: PHP with open_basedir performance problem

2008-01-27 Thread Hugo Silva
Miroslav Lachman wrote: Hi all, I found a painful performance problem with Apache + PHP 5 when open_basedir directive is enabled. Application performance drops by more than 50% with open_basedir enabled. There is also significant disproportion between usr / sys CPU load. (sys is much higher than

Re: PHP with open_basedir performance problem

2008-01-27 Thread Thomas Hurst
* Miroslav Lachman ([EMAIL PROTECTED]) wrote: > As I reported a year ago - problem occured in 5.1.6 (maybe 5.1.5 - I > never tried it, I jumped from 5.1.4 to 5.1.6 or newer). Can somebody > look at PHP sources of those two versions and find the "bad change"? Handily I have 5.1.4 sources right nex

Re: PHP with open_basedir performance problem

2008-01-27 Thread Miroslav Lachman
Thomas Hurst wrote: * Miroslav Lachman ([EMAIL PROTECTED]) wrote: I found a painful performance problem with Apache + PHP 5 when open_basedir directive is enabled. Looks like it's lstat()/readlink() overhead. I wrote a simple bit of PHP similar to yours, but doing 10 * 1000 require "foo/%

Re: PHP with open_basedir performance problem

2008-01-27 Thread Thomas Hurst
* Miroslav Lachman ([EMAIL PROTECTED]) wrote: > I found a painful performance problem with Apache + PHP 5 when > open_basedir directive is enabled. Looks like it's lstat()/readlink() overhead. I wrote a simple bit of PHP similar to yours, but doing 10 * 1000 require "foo/%d/%d.php" calls from th

PHP with open_basedir performance problem

2008-01-26 Thread Miroslav Lachman
Hi all, I found a painful performance problem with Apache + PHP 5 when open_basedir directive is enabled. Application performance drops by more than 50% with open_basedir enabled. There is also significant disproportion between usr / sys CPU load. (sys is much higher than usr) I do not know if th