Re: Locking and concurrency -- system considerations

Top Page
Delete this message
Reply to this message
Author: Jon Morby
Date:  
To: Philip Hazel
CC: exim-users
Subject: Re: Locking and concurrency -- system considerations

> > What about log files, spool files, and so on? Which items can safely
> > be shared between multiple parallel (not just concurrent) instances of
> > Exim executing on different hosts but sharing NFS space? (Presumably
> > not *every* filestore object is locked by Exim before use, but that's
> > OK as long as we know exactly which objects are and which aren't.)
>
> Log files are not locked. Exim always writes log entries as a single
> write() to a file opened with O_APPEND. This won't work for an NFS file
> opened by two different hosts.


Individual logs isn't such a problem, although it would be nice to have a
central logging daemon which collated all the logs (a la syslog, only more
reliable) so you could have one large central log file.

>
> Spool files are locked using fcntl() while Exim is working on a message.
> I hadn't ever thought of two different machines sharing the same spool.
> Since the names of the spool files are generated using the pid of the
> process that receives the message as well as the current time, they are
> not globally unique and there will be a problem.


In the environment I envisage running Exim shared spools are essential. The
current system we have uniques the spool file by taking the numeric ID from
the hostname and using that as well as the pid and current time.

we have several machines (relay-1 -> relay-15 currently) all of which share
one of two spools.

Being restricted to one spool per delivery client would be a restriction I
wouldn't like to have to live with.

It would also be very useful to be able to share the retry/wait db's (probably
essential).

>
> Essentially, the assumption is that each host has its own spool and log
> files.


Unfortunately this assumption doesn't scale particularly well :(

(What happens when one of your relays goes down, and you've got a couple of
thousand messages in it's queue?) The mail gets delayed until you can bring
another box up and mount that spool. Unacceptable in todays market with
consumers rather than techies coming onto the Net.



-- 
Jon Morby                                  mail: jon@???
Fidonet/Internet Gateway                   http: www.fido.net




--
* This is sent by the exim-users mailing list.  To unsubscribe send a
    mail with subject "unsubscribe" to exim-users-request@???
* Exim information can be found at http://www.exim.org/