From owner-freebsd-questions Fri Jun 7 8: 1:46 2002 Delivered-To: freebsd-questions@freebsd.org Received: from infinity.aesredfish.net (ns1.aesredfish.net [65.168.0.12]) by hub.freebsd.org (Postfix) with ESMTP id AC72037B400 for ; Fri, 7 Jun 2002 08:01:41 -0700 (PDT) Received: from potentialtech.com (mhope-dhcp-65-168-1-181.dashfast.com [65.168.1.181]) by infinity.aesredfish.net (8.11.6/8.11.0) with ESMTP id g57F1RU16026; Fri, 7 Jun 2002 11:01:28 -0400 Message-ID: <3D00CC2C.6010203@potentialtech.com> Date: Fri, 07 Jun 2002 11:07:24 -0400 From: Bill Moran User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.0rc1) Gecko/20020502 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Darren Pilgrim Cc: freebsd-questions@freebsd.org Subject: Re: How many files in a directory is "a large number"? References: <3D008B3C.A5944FF7@pantherdragon.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit 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 Darren Pilgrim wrote: > I'm building a file archive, and I know that when you have a large > number of files in directory, that lookups get really slow. I've only > ever heard people say "a large number." No real qualification. How > many files can one have before the slow downs become readily apparent? > Thousands? Tens of thousands? Millions? I need to know in order to > set my archive with as few segmentations in the collections as possible > without running into excessively slow lookups. I seem to remember someone quoting the number 20,000. Hopefully I'm not leading you astray with that number, because I can't remember where I heard/found it. On the flip side, I have some personal experience with directories with lots of files ... I have a client who has ~100,000 files on the shared portion of their fileserver. While I've argued and pushed to keep things organized in directories, there are still a few directories here and there that have 6000-7000 files in them. These directories are unmanagable for the most part. Directly accessing a file in them is fast enough, but if you want a directory listing over the network (SMB) it takes forever ( 15+ seconds just to bring up the list in explorer and how long does it take to scroll through the files to find the one you want?) If you're going to have some method to directly access the file, then the 20,000 is probably ok, but if folks are going to be browsing these directories, I would consider 2000-3000 a more practical maximum. Hope this helps, and I hope I'm remembering correctly with the 20,000 figure. -- Bill Moran Potential Technology http://www.potentialtech.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message