unix question: files per directory
George Robbins
grr at cbmvax.UUCP
Tue Apr 11 09:41:26 AEST 1989
In article <24110 at beta.lanl.gov> dxxb at 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 at uunet.uu.net
Commodore, Engineering Department fone: 215-431-9255 (only by moonlite)
More information about the Comp.unix.questions
mailing list