1

Topic: Dovecot NFS performance

==== Required information ====
- iRedMail version: 0.8.2
- Store mail accounts in which backend: LDAP
- Linux/BSD distribution name and version: Ubuntu 10.04
- Related log if you're reporting an issue:
====

Hi,

We've been using NFS for the Mailbox storage since we initially set up iRedAdmin Pro (LDAP). The NFS mount is on another virtual server on the same physical machine, which up until now has offered acceptable performance for us.

We've recently been looking into moving the NFS storage onto a new remote server (with increased storage), however we've run into a couple of issues with this.

1) I've tried changing the dovecot indexes to be stored locally instead of remotely. But this seems to just not do anything, with all indexes still being stored in /var/vmail/vmail1/%d/%u/Maildir still. /var/indexes remains empty.

Relavent Dovecot conf:

# ---- NFS storage ----
# Set to 'no' For NFSv2. Default is 'yes'.
#dotlock_use_excl = yes 

mmap_disable=yes

mail_nfs_storage = yes # v1.1+ only

# If indexes are on NFS.
mail_nfs_index = yes # v1.1+ only
# ----


# Maildir format and location.
# Such as: /var/mail/vmail01/iredmail.org/www/
#          ----------- ================
#          homeDirectory  mailMessageStore
mail_location = maildir:/%Lh/Maildir/:INDEX=/var/indexes/%Ld/%Lu
ls -al /var | grep indexes
drwxr-xr-x  2 vmail vmail  4096 2012-09-29 22:53 indexes

2) When we tried using the new NFS share on the remote server, IMAP directory listings and dovecot deliver processes seem to just hang, with no obvious cause in the logs. The new NFS share has exactly the same export and mount options as previously, and the latency between the two servers is about 0.3ms. This also has the effect of the IMAP / dovecot deliver processes stacking up on the server, as they are never able to complete.

The mount seems to work correctly in every way I can see (I can list files, add /  delete files manually as the vmail user). I have a gut feeling this may be something to do with NFS file locking, but I'm a bit lost where to start looking for the problem.

I don't think that small latency would cause the problems we are having, not for the small levels of traffic our server is handling.

Any help would be greatly appreciated!

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Dovecot NFS performance

orphans wrote:

mail_location = maildir:/%Lh/Maildir/:INDEX=/var/indexes/%Ld/%Lu

Setting 'INDEX=' here should work as expected. Reference: http://wiki2.dovecot.org/MailLocation#Index_files

orphans wrote:

2) When we tried using the new NFS share on the remote server, IMAP directory listings and dovecot deliver processes seem to just hang, with no obvious cause in the logs.

Dovecot has wiki page about NFS: http://wiki2.dovecot.org/NFS

3 (edited by orphans 2014-09-06 06:57:13)

Re: Dovecot NFS performance

Sorry for coming back to this post 2 years later... but I finally figured out the problem with changing index file locations.

For anyone else having this issue, the mail_location setting is actually being overridden by the ldap user_attrs.

You need to modify /etc/dovecot/dovecot-ldap.conf and change the following:

...
user_attrs      = mail=user,homeDirectory=home,=mail=maildir:~/Maildir/,mailQuota=quota_rule=*:bytes=%$
...

TO:

...
user_attrs      = mail=user,homeDirectory=home,=mail=maildir:~/Maildir/:INDEX=/var/indexes/%Ld/%Lu,mailQuota=quota_rule=*:bytes=%$
...

4

Re: Dovecot NFS performance

Thanks for sharing. smile