Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Sep 2008 11:01:26 +0200
From:      Ivan Voras <ivoras@freebsd.org>
To:        freebsd-questions@freebsd.org
Subject:   Re: dovecot, maildir, UFS 2 performance
Message-ID:  <gbcvk8$3fb$1@ger.gmane.org>
In-Reply-To: <48D95A19.8030700@shopzeus.com>
References:  <48D95A19.8030700@shopzeus.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?gbcvk8$3fb$1>