Xref: utzoo comp.unix.wizards:15485 comp.unix.questions:12771 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!lll-winken!uunet!cbmvax!grr From: grr@cbmvax.UUCP (George Robbins) Newsgroups: comp.unix.wizards,comp.unix.questions Subject: Re: unix question: files per directory Keywords: how many can there be? Message-ID: <6576@cbmvax.UUCP> Date: 10 Apr 89 23:41:26 GMT References: <24110@beta.lanl.gov> Reply-To: grr@cbmvax.UUCP (George Robbins) Distribution: na Organization: Commodore Technology, West Chester, PA Lines: 39 In article <24110@beta.lanl.gov> dxxb@beta.lanl.gov (David W. Barts) writes: > > How many files can there be in a single UNIX directory > (I realize this may depend on the variety of UNIX; I expect > the Berkeley fast file system would allow more)? I need > a better answer than "a lot" or "at least 2000", if possible. At least 33,000 8-) I recently played with an archive of comp.sys.amiga from day 1 and it was on this order. > I realize that as directories get bigger, they slow down, but > how much? Just what IS the maximum directory size? Yeah, it gets real slow and turns the whole system into a dog when you are accessing the directories. Still the time is finite, and the whole restore took maybe 16 hours (I had other stuff going on). The tape went from almost continual motion, to twitching a several times a minute... I seem to recall that the Mach people at CMU were dabbling with some kind of hashed directories or auxilliary hashing scheme, this would make it lots quicker. I don't know if there is a theoreticl maximum, expept that the directory must be smaller than the maximum possible filesize, though I am curious about what constitues an efficient limit so that if I build a directory tree with n entries at each level, what is a reasonable tradeoff between tree depth and search time. This was with Ultrix/BSD, I don't know what limits might pertain to Sys V and other varients. -- George Robbins - now working for, uucp: {uunet|pyramid|rutgers}!cbmvax!grr but no way officially representing arpa: cbmvax!grr@uunet.uu.net Commodore, Engineering Department fone: 215-431-9255 (only by moonlite)