Tunning for large number of files in INBOX

Wil Cooley wcooley at nakedape.cc
Thu Jun 30 02:37:30 EDT 2005

On Wed, 2005-06-29 at 14:52 -0700, Andrew Morgan wrote:

> In the interest of completeness, under 2.6 linux kernels you can format an 
> ext3 partition using the dir_index option.  This enables a hash tree index 
> for directories that supposedly improves lookups with very large 
> directories.  Here is the command I use to build my mail spool filesystem:
>    mkfs -t ext3 -j -m 1 -O dir_index /dev/sdb1
> I have not used other filesystems such as Reiser or XFS, so I cannot offer 

Later 2.4 kernels have hashed directory support also; in fact, I've just
enabled it on my main Cyrus server, which is running CentOS 3.5 and
kernel 2.4.21-27.0.2.ELsmp.  (My e2fsprogs man pages had not been
updated to reflect the new options also.) You don't have to recreate
your filesystem or unmount them for that matter--you can enable it with:

tune2fs -O dir_index /dev/foo

You can also optimize your directories (which is probably a good idea if
you're enabling it on an existing filesystem) with e2fsck:

e2fsck -f -D /dev/foo (you'll need the -f if the filesystem is clean)

Wil Cooley                                 wcooley at nakedape.cc
Naked Ape Consulting                        http://nakedape.cc
* * * * Linux, UNIX, Networking and Security Solutions * * * *
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.andrew.cmu.edu/mailman/private/info-cyrus/attachments/20050629/d5bdc915/attachment.bin

More information about the Info-cyrus mailing list