A request to those people who want B-tree directories

Theodore Y. Ts'o (tytso@MIT.EDU)
Fri, 27 Feb 1998 02:43:04 -0500

To those people who want B-tree directories: It would be useful if you
could run the following command pipeline on your system and sent the
results to me:

find / -type d -ls | awk '{print $2, $11}' | sort | tail

In other words, I'm curious how many disk blocks your largest
directories are. Once you find this out, can you do a

ls {largest directory} | wc -l

so I know how many directory entries are in your largest directories?

Part of the reason why I'm asking these questions is that (as Stephen
Tweedie has pointed out in the past), we can probably get a very large
performance improvement by keeping the existing directory format, and
simply making sure that directories preallocate blocks so that large
directories are contiguous on disk.

Another way of asking the question is --- of those people who complain
that it takes too long to look up a filename in a directory: while Linux
is looking up a filename in a large directory, is Linux disk bound or
CPU bound? If Linux is being disk bound, there are much better
solutions that don't necessarily require a B-tree.

Thanks in advance for being willing to do some data gathering for me.

- Ted

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