[Dovecot] Performance of Maildir vs sdbox/mdbox
Timo Sirainen
tss at iki.fi
Fri Jan 20 02:13:26 EET 2012
On 20.1.2012, at 1.51, Stan Hoeppner wrote:
> I spent a decent amount of time last night researching the NFS cache
> issue. It seems there is no way to completely disable NFS client
> caching (in lie of rewriting the code oneself--a daunting tak), which
> would seem to be the real solution to the mdbox index corruption problem.
>
> So I went looking for alternatives and came up with the idea above.
> Obviously it's far from an optimal solution and introduces some
> limitations, but I thought it was worth tossing out for discussion.
I spent months looking into NFS related issues. I read through Linux and FreeBSD kernel source codes to figure out if there's something I could do to avoid the problems I see. I sent some patches to try to improve things, which of course didn't get accepted (some alternative ways might have been, but it would have required much more work from my part). The mail_nfs_* settings are the result of what I found out. They don't fully work, so I gave up.
> Timo, it seems that when you designed mdbox you didn't have NFS based
> clusters in mind. Do you consider mdbox simply not suitable for such an
> NFS cluster deployment? If one has no choice but an NFS cluster
> architecture, what Dovecot mailbox format do you recommend? Stick with
> maildir?
In the typical random-access NFS setup I don't consider any of Dovecot's formats suitable. Not maildir, not dbox. Perhaps in future I can redesign everything in a way that just happens to work well with all kinds of NFS setups, but I don't really hold a lot of hope for that. It seems that either you'll get bad performance (I'm not really interested in making Dovecot do that) or you'll use such a setup where you get good performance by avoiding the NFS problems.
There are several huge Dovecot+NFS setups. They use director. It works well enough (and with the recent fixes, I'd hope perfectly).
> In this case the OP has Netapp storage. Netapp units support both NFS
> exports as well as iSCSI LUNs. If the OP could utilize iSCSI instead of
> NFS, switching to GFS2 or OCFS, do you see these cluster filesystem as
> preferable for mdbox?
I don't have personal experience with cluster filesystems in recent years (other than glusterfs, which had some problems, but most(/all?) were fixed already or are available from their commercial support..). Based on what I've heard, I'm guessing they work better than random-access-NFS, but even if there are no actual corruption problems, it sounds like their performance isn't very good.
More information about the dovecot
mailing list