SP> On Sun, 30 Jan 2005 03:32:40 +0200, Karolis Dautartas <[EMAIL PROTECTED]> wrote: >> hello qmail-ldap users, >> >> I run a free email server using qmail-ldap and store messages in a >> directory structure like this: >> >> /maildirs/domain.com/user >> >> as with everything that is free, the amount of users is growing day by >> day :) So I am wondering what happens if there are 1000 users in the >> system. There will be 1000 directories (maildirs) in domain.com. That >> sounds kind of OK. >> >> what if there are 100k users? I guess it would slow down filesystem >> quite a bit, no? Maybe it would be a good idea to split the directory >> into something like: >> >> /maildirs/domain.com/001/userxxxx >> /maildirs/domain.com/001/userxxxy >> /maildirs/domain.com/001/userxxxz >> /maildirs/domain.com/001/.... >> /maildirs/domain.com/002/userxxx >> /maildirs/domain.com/002/.... >> ... >> /maildirs/domain.com/XXX/userxxx >> >> The question is: how many maildirs per directory is a good idea? >> >> thanks, >> Karolis >> >>
SP> The performance impact from large directories will have a lot to do SP> with the type of file system you are using. File systems like SP> reiserfs, xfs, and other btree based file systems handle very large SP> directories very well, other like ext2/ext3 that use linked lists for SP> the directory lists can start to slow down when you get more then 10k SP> entries (though linux 2.6 includes the htree patch to do hashed SP> directories indexes which should make accessing it better though I SP> have not tested it personally). SP> What operating system and file system are you using to store the mailboxes on? I am using Fedora Core 2 and EXT3 filesystem. 10k entries is not bad though. thanks, Karolis
