From owner-freebsd-questions Tue Mar 11 8:55:24 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DE13F37B404 for ; Tue, 11 Mar 2003 08:55:22 -0800 (PST) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8A31143F75 for ; Tue, 11 Mar 2003 08:55:20 -0800 (PST) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.7/8.12.7) id h2BGtKEc040375; Tue, 11 Mar 2003 10:55:20 -0600 (CST) (envelope-from dan) Date: Tue, 11 Mar 2003 10:55:20 -0600 From: Dan Nelson To: Bill Moran Cc: questions@FreeBSD.ORG Subject: Re: What is a practical max nujmber of files in a directory Message-ID: <20030311165520.GK34011@dan.emsphone.com> References: <3E6D6A0F.5040704@potentialtech.com> <20030311053714.GG34011@dan.emsphone.com> <3E6DFC65.4050205@potentialtech.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3E6DFC65.4050205@potentialtech.com> X-OS: FreeBSD 5.0-CURRENT X-message-flag: Outlook Error User-Agent: Mutt/1.5.3i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In the last episode (Mar 11), Bill Moran said: > Dan Nelson wrote: > >In the last episode (Mar 10), Bill Moran said: > > > Question for the gurus or anyone who has done any test on > > > filesystem performance. > > > > It Depends > > Thanks for the input ... that was definately an interesting article. > I would have expected dirhash to do more but ... It does for simple filename lookup operations, and from your description that might be just what you want. See the charts near the middle of the document. Most of the benchmark tests later in the paper also timed creation of files, and softupdates sort of blew the scale :) Bumping vfs.ufs.dirhash_maxmem might help if you have a lot of directories that will be hashed. For a time, there was a filesystem called "ifs" which basically was FFS with no directories, and all the files named by their inodes for immediate lookup. It was removed to make way for UFS2, though, but I believe it will be put back at some point. > too big. The question I need to answer is: how many files can a > directory contain before the system determines that no more files > should be placed in it? The database will determine where and what > file to retrieve, so I don't need to worry about the listing getting > too long to be easily managed by command-line tools, but I want to > make sure that finding a specific file in that directory doesn't get > too awfully time-consuming. I don't think there is a limit on the number of files. I seem to remember a limit on 65534 subdirectories in a single directory (because the inode link count only goes up to 64k), though. -- Dan Nelson dnelson@allantgroup.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message