[Humberto Massa] > As I said before, as far as I recall, the Debian installer suggested > me only filesystems that have O(1) [O(log n) worst case] directory > lookup. I chose reiserfs, but the installer IIRC suggested ext3 and > xfs as alternatives.
As Christoph (I think) said, Debian creates ext3 filesystems without the dir_index flag, by default. He even mentioned that ext3 dir_index may have a few problems remaining, so that this is a wise default. You may of course use 'tune2fs -O dir_index /dev/whatever' to change this, and then you'll have your O(1) lookups and opens. Requires remounting, and I think an fsck pass. HOWEVER This is a very silly thing to argue about without benchmarks. Those who care about this - yes, Thomas, I mean you - should get numbers. Here's how: (1) dynamicly link a hello world program to a dozen or so libraries (2) find or create a Debian system with a few thousand /usr/lib files (3) figure out execution time using your favorite loop technique (4) rename /usr/lib to /usr/libexec, create a new /usr/lib, and use 'ln' (not 'ln -s' of course - symlinks of course just add *more* lookups, in the original big directory) to repopulate /usr/lib with just a few hundred library files and symlinks. You may wish to give /lib similar treatment, but tread with care lest you find yourself unable to complete the procedure. (For one thing you'll want to do it in 'sash' or 'busybox'.) (5) repeat your favorite loop technique Getting a cold dentry cache before steps 3 and 5 is left as an exercise to the poor sap with so much dedication to the Gentoo "premature optimisations R us" ideals. Oh yeah, for bonus points: (6) put your original /usr/lib back where it was, then convert libfoo.so.N symlinks to hard links. That will cut your directory lookups in half. See if this makes any difference. If so, ponder a new proposal taking this "optimisation" into account as well.
signature.asc
Description: Digital signature