[Dovecot] performance of maildir on ocfs2

Philipp Snizek mailinglists at belfin.ch
Mon Apr 26 21:42:23 EEST 2010


On 26.04.2010 14:51, karavelov wrote:
> On 26.04.2010 14:37, mailinglists at belfin.ch wrote:
>> Hi,
>>
>> I would like to run my imap service on a active-active cluster. I wonder
>> how well OCFS2 performs in read and write with millions of smallest files
>> involved. Has anybody got any experience?
>>
>> Thanks
>> John
>
> I have some experience.
>
> I have done some test and benchmarks here for OCFS2 and NFS4. My
> understanding is that GFS2 limitations and performance are similar to
> OCFS2's, so I have not included it in the tests. My benckmarks showed
> that OCFS2 has an order of magnitude better performance for IMAP
> server (for benchmarks I have used imaptest).
>
> Though, there are some concerns:
>
> 1. For better performance you would like to stick one account to one
> server. If one account is checked concurrently from different nodes
> of OCFS2 cluster they invalidates each-other the direcotory cache for
> the Maildir. It result in a lot more IO. I use nginx for load balancing
> incomming pop3/imap connections if front of dovecot servers.
 >
> 2. OCFS2 has a limit for 32k files per directory. There is directory index
> support in recent kernels (> 2.6.33) that will remove this limit, but the
> userland tools are not yet ready for production (not in the master
> branch of ocfs2-tools)
 >
> 3. My understanding is that OCFS2 uses a global lock for move/rename.
> As you know, Maildir format uses a lot of such operations. I think that
> dbox format (dovecot native) will be better choice, because there are
> no file moves/renames. I am planning migration to dbox now. If I have
> to start the service now, I would choose dbox for mail storage.
>
> 4. Filesystem quota. OCFS2 has support in recent kernels. It has
> integrated in
> ocfs2-tools master branch but there is not yet release of the tools. So I
> do not hurry to push it in production.


So bottom line is to use a filesystem such as XFS, distribute and 
dedicate mailboxes to a number of backend imap servers optimally with 
direct access to the storage and do imap proxying and loadbalancing in 
front of those servers.

> I hope it hepls

Thanks, it did!

Best wishes


More information about the dovecot mailing list