From owner-freebsd-current@FreeBSD.ORG Fri Aug 26 10:15:22 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 637D516A41F for ; Fri, 26 Aug 2005 10:15:22 +0000 (GMT) (envelope-from dwmalone@maths.tcd.ie) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by mx1.FreeBSD.org (Postfix) with SMTP id 99D4D43D45 for ; Fri, 26 Aug 2005 10:15:21 +0000 (GMT) (envelope-from dwmalone@maths.tcd.ie) Received: from walton.maths.tcd.ie ([134.226.81.10] helo=walton.maths.tcd.ie) by salmon.maths.tcd.ie with SMTP id ; 26 Aug 2005 09:12:46 +0100 (BST) Date: Fri, 26 Aug 2005 09:12:45 +0100 From: David Malone To: Marian Hettwer Message-ID: <20050826081245.GA83206@walton.maths.tcd.ie> References: <430E06AA.2000907@kernel32.de> <6.2.3.4.0.20050825135916.07a19ac8@64.7.153.2> <430E3743.3030108@kernel32.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <430E3743.3030108@kernel32.de> User-Agent: Mutt/1.5.6i Sender: dwmalone@maths.tcd.ie Cc: freebsd-current@freebsd.org, Mike Tancsa Subject: Re: filesystem performance with lots of small files 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: Fri, 26 Aug 2005 10:15:22 -0000 On Thu, Aug 25, 2005 at 11:25:23PM +0200, Marian Hettwer wrote: > I didn't changed anything from the defaults... it looks like that: > mhettwer@submaster-test$ sysctl vfs.ufs.dirhash_maxmem > vfs.ufs.dirhash_maxmem: 2097152 > mhettwer@submaster-test$ sysctl vfs.ufs.dirhash_mem > vfs.ufs.dirhash_mem: 368622 > > By the way, the copy job of my small files finished, so here we go with > some small facts :) > mhettwer@submaster-test$ sudo time find /usr/tmp/ | wc -l > 133.81 real 2.01 user 3.95 sys > 2904696 (Sorry - I missed the start of this thread.) With dirhash it is how many files/directories you have in one directory that is important. Subdirectories don't count. One way to get a rough estimate of how big you should make vfs.ufs.dirhash_maxmem is do to "ls -ld /usr/tmp" and see how many bytes the directory takes. The number of bytes shown is probably a reasonable estimate of what you should set vfs.ufs.dirhash_maxmem to. David.