PHP with open_basedir performance problem

Alexey Popov lol at chistydom.ru
Mon Jan 28 00:53:05 PST 2008


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 for details:
http://lists.freebsd.org/pipermail/freebsd-stable/2007-November/038371.html


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 usr)
> I do not know if this is problem on FreeBSD side or in PHP code itself.
> This problem exists on FreeBSD 6 and 7 (maybe older versions too - I did
> not check).
> I tested both shedulers on FreeBSD 7, no big difference (application
> performance is little better with 4BSD).
> Is there anyone with enough knowledge and time to look at it?



More information about the freebsd-performance mailing list