From owner-freebsd-fs@FreeBSD.ORG Thu Aug 16 17:13:48 2007 Return-Path: Delivered-To: freebsd-fs@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8E77116A41B for ; Thu, 16 Aug 2007 17:13:48 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [IPv6:2001:1b20:1:3::1]) by mx1.freebsd.org (Postfix) with ESMTP id E590413C45E for ; Thu, 16 Aug 2007 17:13:47 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (cdsdyb@localhost [127.0.0.1]) by lurza.secnetix.de (8.13.4/8.13.4) with ESMTP id l7GHDerg014550; Thu, 16 Aug 2007 19:13:46 +0200 (CEST) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.13.4/8.13.1/Submit) id l7GHDexf014549; Thu, 16 Aug 2007 19:13:40 +0200 (CEST) (envelope-from olli) Date: Thu, 16 Aug 2007 19:13:40 +0200 (CEST) Message-Id: <200708161713.l7GHDexf014549@lurza.secnetix.de> From: Oliver Fromme To: freebsd-fs@FreeBSD.ORG, gore_jarold@yahoo.com In-Reply-To: <440077.63078.qm@web63005.mail.re1.yahoo.com> X-Newsgroups: list.freebsd-fs User-Agent: tin/1.8.2-20060425 ("Shillay") (UNIX) (FreeBSD/4.11-STABLE (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Thu, 16 Aug 2007 19:13:46 +0200 (CEST) Cc: Subject: Re: vfs.ufs.dirhash_maxmem ... how high can I go ? X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-fs@FreeBSD.ORG, gore_jarold@yahoo.com List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Aug 2007 17:13:48 -0000 Gore Jarold wrote: > Gore Jarold wrote: > > Based on the previous discussion, I have decided > > to up my dirhash_maxmem and also to start tracking > > its usage over time ... > > > > I doubled it, then doubled again, then again ... > > and the system even hit the 16 MB ceiling. > > > > So now I have set it to 32 MB and we will see if > > the system can max that out. > > [...] > > Ok, it just ht the 32 MB limit. Well, you said you have > 20 million inodes. If all of them are accessed, I'm not surprised that your dirhash memory is maxed out. In that case FreeBSD will use up whatever amount you throw at it. Note that maxing it out is not a problem, it will just expire and overwrite old entries (it's only a kind of cache after all). You can even disable dirhash completely in your kernel, and the system should still run fine (albeit somewhat slower). > Bad things on the horizon if I up it further ? Or > does my 4+4 GB memory and other details above make > it benign ? Note that the dirhash memory is allocated from kernel memory, which is limited. See sysctl vm.kmem_size. And dirhash is not the only facility in the need of kernel memory, so you should be careful upping it any further. When the system runs out of kernel memory, it will panic. (However, you can increase the amount of kernel memory if necessary.) In any case, you should perform benchmarks with your typical application load, in order to find out if increasing dirhash_maxmem has any positive effect on it. If there's no clear performance improvement, it's not worth wasting kernel memory. Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd "If you think C++ is not overly complicated, just what is a protected abstract virtual base pure virtual private destructor, and when was the last time you needed one?" -- Tom Cargil, C++ Journal