dovecot, maildir, UFS 2 performance
Ivan Voras
ivoras at freebsd.org
Wed Sep 24 09:01:08 UTC 2008
Laszlo Nagy wrote:
> The secondary task for this server is to be an IMAP and mail server. We
> will be using dovecot, and shared maildir folders with ten thousands of
> messages. I'm not sure where to put the maildir folders, and what
> options to use for the filesystem. Dovecot wiki is not talking about
> UFS, only ext3, reiserfs and xfs:
>
> http://wiki.dovecot.org/MailboxFormat/Maildir
You can treat UFS as ext2/3 with dir_index enabled by default (not
exactly but that's what dirhash translates to in practice). You will
probably want to increase vfs.ufs.dirhash_maxmem sysctl to several
megabytes if you have large directories.
> Can you tell me some basic idea about how to configure this? I have some
> ideas but they may be competely wrong:
>
> #1 maildir stores each message in a separate file. I think I need to
> dedicate a separate disk slice for maildirs and decrease block size on
> it. How big should the blocksize be?
UFS by default creates 2k fragments ("sub-blocks"), so in practice any
tuning in this direction won't do much.
> #2 searching in messages is a common operation. Possibly read speed is
> very most important. But since there will be thousands of files to open,
> seek operation is also important. On which RAID array should I put mail
> dirs? Small SAS or bigger SATA array?
More drives=better in this case. Don't forget to tune dirhash_maxmem.
More information about the freebsd-questions
mailing list