Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Jan 2008 00:31:56 +1100
From:      Antony Mawer <fbsd-performance@mawer.org>
To:        Alexey Popov <lol@chistydom.ru>
Cc:        freebsd-performance@freebsd.org, Miroslav Lachman <000.fbsd@quip.cz>
Subject:   Re: PHP with open_basedir performance problem
Message-ID:  <479DD94C.7010409@mawer.org>
In-Reply-To: <479D89C9.7060300@chistydom.ru>
References:  <479B1185.8020604@quip.cz> <479D89C9.7060300@chistydom.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
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 in open_basedir.
> 
> See the following thread for details:
> http://lists.freebsd.org/pipermail/freebsd-stable/2007-November/038371.html

... so how does one go about profiling lstat() to find out where the 
source of the slowness originates from? Is pmc profiling the way to do this?

The last thread on this topic (referenced above) seemed to point the 
finger at the default value of vfs.ufs.dirhash_maxmem being too small... 
which would suggest this is an inherit limitation in UFS(2?) and/or its 
default tuning.

If you try increasing the amount of memory allocated for dirhash, does 
this improve performance at all? eg:

     # sysctl vfs.ufs.dirhash_maxmem=10240000
     vfs.ufs.dirhash_maxmem: 2097152 -> 10240000

... and then re-run the benchmarks to see if this makes any noticeable 
difference. The fact that it was indicated that Mac OS X also suffers 
the same problems suggests this may be a VFS issue rather than UFS 
specific...?

--Antony



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?479DD94C.7010409>