[Linux-cluster] GFS performance of imap service (Maildir)

R Wahyudi rwahyudi+linuxcluster at gmail.com
Mon Dec 15 14:32:59 UTC 2008


2008/11/25 David McBride <dwm at doc.ic.ac.uk>:
> On Wed, 2008-11-12 at 17:44 +0800, Achievement Chan wrote:
>
>> I've setup a courier-imap server which store the email data in Maildir format.
>> The mailbox are saved under a LUN in ISCSI SAN.
>
> I have no experience running the Courier IMAP server.  However, the
> Dovecot[0] IMAP/POP server implementation -- which maintains its own
> indexes of mbox / maildir contents -- may provide better performance in
> this configuration.
>
> Cheers,
> David
>
> [0] http://www.dovecot.org/
> --
> David McBride <dwm at doc.ic.ac.uk>
> Department of Computing, Imperial College, London
>
> --
> Linux-cluster mailing list
> Linux-cluster at redhat.com
> https://www.redhat.com/mailman/listinfo/linux-cluster
>

I've tried both Dovecot & Courier using maildir storage mounted on GFS.
Both server  perform a lot slower on GFS compared to NFS even though
GFS has smaller overhead.

Maildir was designed for "lockless" filesystem. It does its own
checking and take
extra steps to make sure that the file is not being used by other process.
These extra step is not necessary on GFS file system.

Maildir also do a lot of stat() & readdir() system calls which considered to be
very expensive system calls for GFS & other cluster file system.

Slow  performance issue will be noticeable if your users keep an average
of 1000+ email in their mailbox (especially if you have lots of these users)

Changing maildir to mbox may helps reducing IO wait and increase mail
server performance, but
mbox format have file locking issue and prone to corruption.

My ideal way is to mount maildir on ext3 filesystem and scale
horizontally to different servers.
eg :Server A hold & serve users with last user_id 0 to 3,
      Server B hold & serve  users with last user_id from 4 to 6m,
      Server C hold & serve user with last user id from 7-9

These can be achieve with extra settings on your MTA to direct mail to
the right server, and using perdition proxy
to direct IMAP/POP to the right server.

Regards,
Rianto Wahyudi




More information about the Linux-cluster mailing list