Re: very large directories

From: Helge Hafting (helgehaf@idb.hist.no)
Date: Wed Mar 01 2000 - 03:11:00 EST


>Mostly it's a format of on-disk representation. IOW, introduce your
>cow-orker to clue-by-4 - keeping a lot of files in on directory is _BAD_
>idea.

Not really. He needs to keep an amount of data on disk.
The organization shouldn't matter that much for performance. If it
does anyway it means we have a performance problem, or at least
a system unfit for that special case.

Keeping lots of files in a directory is surely a bad idea with ext2.
That don't mean the idea is bad, just that ext2 don't fit that purpose
with its sequential scans.

Filesystems with b-tree directories have O(log n) performance for
directory
lookup. An "rm *" which gets O(n^2) complexity in ext2 gets O(n log n)
which is a lot better. Try reiserfs (or hpfs). Looking up
or deleting lots of files isn't a problem with that approach.

Helge Hafting

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Mar 07 2000 - 21:00:09 EST