From owner-freebsd-performance@FreeBSD.ORG Mon Jan 28 08:53:05 2008 Return-Path: Delivered-To: freebsd-performance@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 689C616A41B for ; Mon, 28 Jan 2008 08:53:05 +0000 (UTC) (envelope-from lol@chistydom.ru) Received: from hermes.hw.ru (hermes.hw.ru [80.68.240.91]) by mx1.freebsd.org (Postfix) with ESMTP id E9AC013C4EC for ; Mon, 28 Jan 2008 08:53:04 +0000 (UTC) (envelope-from lol@chistydom.ru) Received: from [80.68.244.40] (account a_popov@rbc.ru [80.68.244.40] verified) by hermes.hw.ru (CommuniGate Pro SMTP 5.0.14) with ESMTPA id 215120382; Mon, 28 Jan 2008 10:52:03 +0300 Message-ID: <479D89C9.7060300@chistydom.ru> Date: Mon, 28 Jan 2008 10:52:41 +0300 From: Alexey Popov User-Agent: Thunderbird 2.0.0.6 (X11/20070924) MIME-Version: 1.0 To: Miroslav Lachman <000.fbsd@quip.cz> References: <479B1185.8020604@quip.cz> In-Reply-To: <479B1185.8020604@quip.cz> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Mon, 28 Jan 2008 12:25:54 +0000 Cc: freebsd-performance@freebsd.org Subject: Re: PHP with open_basedir performance problem X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jan 2008 08:53:05 -0000 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?