This documentation is for Dovecot v2.x, see wiki1 for v1.x documentation.
Differences between revisions 10 and 11
Revision 10 as of 2011-02-02 14:02:08
Size: 1467
Editor: 230
Comment:
Revision 11 as of 2011-02-02 14:06:16
Size: 1716
Editor: 230
Comment:
Deletions are marked like this. Additions are marked like this.
Line 10: Line 10:

If you don't have battery backed caches on your disks/raid-controller, make sure to enable the "barrier" mount option to avoid data corruption on power failure. This option is filesystem dependent, so please check "man mount" for correct syntax.

After a loooong thread on the dovecot mailinglist,http://article.gmane.org/gmane.mail.imap.dovecot/55874, Timo finally asked this discussion was taken elsewhere and suggested this wiki-page.

Reliability


As long as mail_fsync is not set to "never", any (local) filesystem should be equally reliable from data loss issues from dovecot usage. This is because dovecot (and most SMTP-servers) will not aknowledge a message as processed before fsync() returns sucessfully. To quote Timo:

"Success isn't returned to dovecot-lda or IMAP APPEND call until the mail has been fsynced. As long as the disk doesn't lie and the filesystem doesn't lie, there is zero data loss when fsyncing isn't disabled with Dovecot."

What about NFS? Cluster filesystems? Running with mail_fsync=never ?

If you don't have battery backed caches on your disks/raid-controller, make sure to enable the "barrier" mount option to avoid data corruption on power failure. This option is filesystem dependent, so please check "man mount" for correct syntax.

Performance


Dovecot typically runs on Maildirs containing many small files in each directory, and needs high rate of random IOPS. When selecting filesystem for dovecot, one should look for a filesystem that can handle many small files, over filesystems that can efficiently stream large files.

Separate filesystems for maildirs and indexes? Cluster/NFS filesystem for maildirs, local filesystem for indexes ?

Good candidates: XFS, ext4? ext3 with data=writeback ?

Known bad: ext3 with data=ordered http://lwn.net/Articles/328363/ ?

Future ideas


RFC: grouped fsync() http://comments.gmane.org/gmane.mail.imap.dovecot/55173

None: FileSystems (last edited 2011-02-02 14:06:16 by 230)