From owner-freebsd-stable@FreeBSD.ORG Thu Nov 22 11:44:21 2007 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9BB8016A468; Thu, 22 Nov 2007 11:44:21 +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 9AEFC13C4EC; Thu, 22 Nov 2007 11:44:20 +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.13) with ESMTPA id 202153338; Thu, 22 Nov 2007 14:43:54 +0300 Message-ID: <47456B71.5040205@chistydom.ru> Date: Thu, 22 Nov 2007 14:43:45 +0300 From: Alexey Popov User-Agent: Thunderbird 2.0.0.6 (X11/20070924) MIME-Version: 1.0 To: Kris Kennaway References: <4741905E.8050300@chistydom.ru> <47419AB3.5030008@chistydom.ru> <4741A7DA.2050706@chistydom.ru> <4741DA15.9000308@FreeBSD.org> <47429DB8.7040504@chistydom.ru> <4742ADFE.40902@FreeBSD.org> <4742C46A.1060701@chistydom.ru> <47432F77.3030606@FreeBSD.org> <474339E9.4080301@FreeBSD.org> <4743629B.9090408@FreeBSD.org> In-Reply-To: <4743629B.9090408@FreeBSD.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: Attilio Rao , freebsd-stable@freebsd.org Subject: Re: 2 x quad-core system is slower that 2 x dual core on FreeBSD X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Nov 2007 11:44:21 -0000 Hi. Kris Kennaway wrote: >>> In the meantime there is unfortunately not a lot that can be done, >>> AFAICT. There is one hack that I will send you later but it is not >>> likely to help much. I will also think about how to track down the >>> cause of the contention further (the profiling trace only shows that >>> it comes mostly from vget/vput but doesn't show where these are >>> called from). >> >> Actually this patch might help. It doesn't replace lockmgr but it >> does fix a silly thundering herd behaviour. It probably needs some >> adjustment to get it to apply cleanly (it is about 7 months old), and >> I apparently stopped using it because I ran into deadlocks. It might >> be stable enough to at least see how much it helps. > Try this one instead, it applies to HEAD. You'll need to manually enter > the paths though because of how p4 mangles diffs. Finally I tried your patch and it seems to help a little. Now FreeBSD 7-STABLE ULE 8-core server without optimized PHP realpath_cache_size (producing 2000+ lstats per request) can handle up to ~24 rps as opposed to max. 17 rps without your patch. %sys never grows over %user with your patch. On the server with optimized realpath_cache_size there's no visible influence of your patch. However Linux is still 2 times faster for my workload and there should also be another ways for optimization. With best regards, Alexey Popov