Ever growing directories [Re: WEIRD ext2fs dir size BUG?]

Janos Farkas (Janos.Farkas-nouce/priv-#Kxid.MT7hKJ7QBhXrTNf7lufxvW@lk9qw.mail.eon.ml.org)
Wed, 4 Mar 1998 00:12:26 +0100


On 1998-03-02 at 16:34:07, Anthony DeBoer wrote:
> Alan Cox <alan@lxorguk.ukuu.org.uk> writes:
> > For some things like news servers an e2fsdefrag or e2fsck option to
> > compact directories might be useful.
>
> In the general case, if the number of files in a directory has
> previously hit some high-water mark, there's a chance it'll happen
> again, and having that much contiguous space allocated to the
> directory should be a win.

Another example is qmail's "todo" directory, (description from vague
memories alert) it will contain a new file for each new injected one,
and the directory will be normally emptied in a similar pace by another
daemon. The normal size of this directory thus is pretty normal.
However, under pathologically high traffic (cf. hotmail), a short
downtime of this daemon might cause this directory to grow ridiculously
large. After that, operations in the todo directory will be always
slower than it was originally.

I too know how to fix things up after such an accident, but even if not
wrong, it's clearly disadvantageous for the kernel to not fix what it
knows must be fixed.

And there is the usual excuse that system programmers should know better
to avoid known weak points in Unix implementations, but Linux has shown
multiple times that it's sometimes possible to handle pathological cases
very well, while still handling usual cases significantly better than
others. :)

Oh, I just realized that noone would object a working implementation. :)
Sorry, not this time, maybe other interesting things soon.

-- 
Janos - Don't worry, my address is real.  I'm just bored of spam.

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu