I'm using currently with great success an ext3 root partition in favor of reiserfs/xfs/jfs/reiser4. I tried all of them in the aforementioned order, but finally I came back to ext3 filesystem. Why? Because there are two things: * ext3 is a tried, mostly error-free filesystem, * it has a very nice dir_index option, comparable with (or maybe better than?) reiserXX implementations, I have to admit that after looking in current Handbook I'm very positively surprised that the default proposal is to go with ext2 => /bootand ext3 => / partitions. That's a nice change, compared to default "mkreiserfs" I remember when I first was installing Gentoo. But enough background for now, let's go to the real enhancement request. A handbook in the chapter 4, point "4.d. Creating Filesystems" mentions that ext3 filesystem "has an additional hashed b-tree indexing option that enables high performance in almost all situations". However, there's no example of how to get the mentioned "high performance". And it's quite simple! Basically there's a "dir_index" ext3's option, which creates hashed b-trees for long directories, which speeds up reading their contents. Reproducible: Always Steps to Reproduce: 1. Go to the "4.d. Creating Filesystems" section in Handbook: http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=4#doc_chap4 to see an original command: # mke2fs -j /dev/hda3 2. Go to the "Some ext3 Filesystem Tips" topic in the forums: http://forums.gentoo.org/viewtopic-t-305871.html to see quite a good discussion of the dir_index option. Actual Results: A. When creating a new ext3 filesystem, all that's needed to get the aforementioned "high performance" is to do: # mke2fs -j -O dir_index /dev/hda3 B. For existing ext3 filesystem it's possible to turn the "dir_index" option, by executing: # tune2fs -O dir_index /dev/hda3 # e2fsck -D /dev/hda3 Expected Results: Please add an example in the handbook of how to use "dir_index" option for ext3 filesystem. This way more [new] Gentoo users may want to use this from the very beginning. And last but not th least: IMHO, the "emerge --sync" completes faster for me on ext3 filesystem compared to reiserfs/reiser4 on the same partition!
Thanks. I've added this information to the handbook but not in the real example yet (only in the explanation). I need more information from the architectures to know if dir_index is recommended by them as a good default (as it is with SPARC) or not.
Thank you very much! :-) That fits there very well indeed, and probably may be enough. Just one more tiny proposal form my side. The -O in the text you've kindly added can be easily misinterpreted as -0 by someone. That's why I reopened the bug. To prevent such mistakes please add a small clarification, as such: "You can enable this indexing by adding -O dir_index to the mke2fs command (using a capital -O, not zero: -0)." Thanks again for a very quick response!
Missing between O and 0 happens in a lot of cases, not only here. I don't think it is needed to clarify this even more now; lots of people just copy/paste or take care when they see something like this. Also, the mke2fs command will tell the user that -0 is no valid option. I'd rather not update the handbook for this.
Specifying the "-O foo" option will override the default settings from /etc/mke2fs.conf. As of sys-fs/e2fsprogs-1.39 (current x86 stable), the defaults are "sparse_super,filetype,resize_inode,dir_index". So, if you follow the advice from the Handbook, you'll get "dir_index" only which is *not* good. Could be worth marking as a blocker for 2006.1 to limit the number of people with suboptimal settings :).
I'd do it myself but I'm sort of AF[gentoo]K till mid September so this is probably the best way...
All fixed in the upcoming 2006.1 handbooks; release is soon, no point in updating the old 2006.0 handbooks. :)
Oops, forgot to mark RESO FIXED per above.
(In reply to comment #4) > Specifying the "-O foo" option will override the default settings from > /etc/mke2fs.conf. As of sys-fs/e2fsprogs-1.39 (current x86 stable) 2006.1 uses 1.38. A bit of checking wouldn't hurt :) dir_index will most likely be on by default for 2007.0 (>=sys-fs/e2fsprogs-1.39)
(In reply to comment #8) > dir_index will most likely be on by default for 2007.0 > (>=sys-fs/e2fsprogs-1.39) Indeed, it will be, so we'll need to take that out for the handbook again. :p
Fixed in the 2007.0 drafts. In CVS.
For the record, adding -O dir_index until 1.38 was a good idea. As of 1.39, it does not make any difference. dir_index is on by default and adding it to the command line does not override anything. [14 10:44:44] <leio> so, good information :) [14 10:50:13] <leio> neysx: but apparently not true [14 10:50:26] <leio> the filesystem was formatted as follows: [14 10:50:32] <leio> mke2fs -j -O dir_index,resize_inode -v /dev/hda2 [14 10:50:41] <leio> dumpe2fs gives the following as features: [14 10:50:46] <leio> Filesystem features: has_journal resize_inode dir_index filetype needs_recovery sparse_super large_file [14 10:51:02] <leio> is -O overriding the defaults a new thing in 1.39 too? [14 11:00:03] <neysx> so I have been told, haven't checked it really overrides all, but dir_index is now on by default [14 11:00:06] <neysx> gimme a minute [14 11:01:47] <neysx> mke2fs -j /dev/sdc1 [14 11:01:50] <neysx> Filesystem features: has_journal resize_inode dir_index filetype sparse_super large_file [14 11:02:34] <neysx> mke2fs -j -O dir_index /dev/sdc1 [14 11:02:36] <neysx> Filesystem features: has_journal resize_inode dir_index filetype sparse_super large_file [14 11:02:49] <neysx> pfft, does not make a difference