Re: [exim] Exim and NFS mounted mail spool

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Graeme Fowler
Dátum:  
Címzett: exim-users
Tárgy: Re: [exim] Exim and NFS mounted mail spool
Hi

On Thu, 2008-04-17 at 15:16 -0700, Robert Fargher wrote:
> We have a mail server (Mail1) with 3373 mbox mail accounts,
> in /var/spool/mail. I am setting up a second mail server (Mail2)and am
> mounting /var/spool/mail & /home from Mail1 on Mail2 via NFS.


Aha, the current "dispute du jour" - Hi, Jeroen!

> If delivery of mail on Mail2 is configured to a non-NFS directory, delivery
> is lickety-split. However delivery to the NFS mounted mail spool is greatly
> delayed, with frequent time-outs.


There are several possible issues here:

1. The mount options used for your NFS mounts
2. The filesystem, RAID or system setup of the NFS server itself
3. Your network
4. How your clients are accessing the mailboxes

> In this setup, is it that the mail spool is mbox rather than maildir likely
> the source of the lack of Mail2's performance?


Possibly. Taking the above in order:

1. Make sure you use TCP, not UDP (which is the default in recent Linux
NFS client implementations anyway) as the protocol itself then adds a
layer of error handling to the connection. Also ensure you have as large
a read/write window (block) size as possible. Currently I'm using the
following options for most mount points I have anything to with:

rw,bg,vers=3,tcp,timeo=600,rsize=32768,wsize=32768,hard,intr

I recommend reading the nfs man page to gain an understanding of what
those options do, if you haven't already.

2. Here be dragons! There are so many things that can affect this, but
the main ones are:

      * Make sure your network cards aren't set to auto-negotiate.
        Hard-configure them to the highest possible speed/duplex.
      * Mount your mail spool noatime on the NFS server.
      * Do not use RAID5 for your mail spool (religious battles ahoy).
      * Have as much RAM in the machine as it can handle - the machine
        will cache as much of the FS as it can do after it's accessed,
        which can speed up delivery across the wire.


There's a lot more but those are the main, "off the top of my head"
points.

3. Make sure your network path is clean, and as short as possible - a
direct private link between the two machines is best.

4. With mbox format, you might find that a client opening a mailbox
causes it to be locked, so Exim can't deliver to it.

Maildir mitigates a few of these issues but raises others: many
thousands of messages take longer to stat() than a big mbox, so folder
access can seem to pause.

Food for thought!

Graeme