From owner-freebsd-current@FreeBSD.ORG Wed May 27 11:45:54 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1081F1065670; Wed, 27 May 2009 11:45:54 +0000 (UTC) (envelope-from dg@dglawrence.com) Received: from dglawrence.com (75-148-92-17-Oregon.hfc.comcastbusiness.net [75.148.92.17]) by mx1.freebsd.org (Postfix) with ESMTP id CE6838FC0A; Wed, 27 May 2009 11:45:53 +0000 (UTC) (envelope-from dg@dglawrence.com) Received: from tnn.dglawrence.com (localhost [127.0.0.1]) by dglawrence.com (8.14.1/8.14.1) with ESMTP id n4RBjr2d015770; Wed, 27 May 2009 04:45:53 -0700 (PDT) (envelope-from dg@dglawrence.com) Received: (from dg@localhost) by tnn.dglawrence.com (8.14.1/8.14.1/Submit) id n4RBjr6o015769; Wed, 27 May 2009 04:45:53 -0700 (PDT) (envelope-from dg@dglawrence.com) X-Authentication-Warning: tnn.dglawrence.com: dg set sender to dg@dglawrence.com using -f Date: Wed, 27 May 2009 04:45:53 -0700 From: David G Lawrence To: Nick Barkas Message-ID: <20090527114553.GB25063@tnn.dglawrence.com> References: <20090527103648.GA61454@ebi.local> <20090527111238.GA2000@freebsd.org> <20090527113351.GA61692@ebi.local> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090527113351.GA61692@ebi.local> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (dglawrence.com [127.0.0.1]); Wed, 27 May 2009 04:45:53 -0700 (PDT) Cc: Roman Divacky , "freebsd-current@freebsd.org" Subject: Re: vm_lowmem event handler for dirhash X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 May 2009 11:45:54 -0000 > On Wed, May 27, 2009 at 01:12:38PM +0200, Roman Divacky wrote: > > On Wed, May 27, 2009 at 12:36:49PM +0200, Nick Barkas wrote: > > > Some time during the next week or so, I plan on committing the attached > > > patch. It adds a vm_lowmem event handler to the dirhash code in UFS2 so > > > that dirhashes will be deleted when the system is low on memory. This > > > allows one to increase the maximum amount of memory available for > > > dirhash on machines that have memory to spare (via the > > > vfs.ufs.dirhash_maxmem sysctl), and hopefully just improving behaviour > > > in low memory situations. I worked on this last year for the summer of > > > code with David Malone as my mentor. > > > > cool! do you have any performance numbers? graphs? :) what value do you recommend > > for the dirhash_maxmem sysctl? > > Oh yes, I have many graphs: http://wiki.freebsd.org/DirhashDynamicMemory > When I ran those tests a few months ago, I used 64MB for dirhash_maxmem > on a system with 1GB of memory. I have not tried other amounts of memory > besides that, at least that I can recall, so please let me know what you > find if you experiment with other values. Performance improvements and > sometimes degradations changed depending on the type of work load, and > the results on 7.x were also sometimes quite different from -current. > I feel that the tests I did were pretty artificial though, so it would > be great to hear about any results found with more realistic testing. I'm wondering if you have a low limit on how far you will reduce the dirhash. In a system that is thrashing a bit (due to a large process, for example), I can imagine multiple (10+) calls to the lowmem handler in rapid succession that would completely deplete the dirhash. Seems like this would result in even worse thrashing as more disk I/O occurs due to lack of dirhash. -DG David G. Lawrence President Download Technologies, Inc. - http://www.downloadtech.com - (866) 399 8500 Pave the road of life with opportunities.