Re: [Exim] Inefficiency of wait-xxx DBM files

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Philip Hazel
Datum:  
To: Sheldon Hearn
CC: exim-users
Betreff: Re: [Exim] Inefficiency of wait-xxx DBM files
On Wed, 24 Apr 2002, Sheldon Hearn wrote:

> Exim keys these files on hostname.
>
> It surprised me that it doesn't key them on domain name.


Why? It is trying to remember which messages are waiting for specific
hosts so that when it has a connection to a host, it can pass any
messages that are waiting for it, whatever domains are involved.

Extreme example: Exim is configured to send all non-local messages to a
smart host. If the smarhost is down, all messages will get into wait-xxx
in a single entry for the one host. When the smarthost is available,
they all go down one connection.


> 1) The same message ID can end up on the waiting list for multiple
>    hostnames.  When the number of waiting messages is large, the size of
>    the DBM file can become huge, to the point where Exim processes begin
>    to time out waiting for their turn to play with it.


As I'm sure you know well :-) you are pushing the limits of Exim's
design. All this stuff was designed for handling "exceptional cases". In
my environment, 95% of messages get delivered at first attempt, so it's
only a small number that ever get into a wait-xxx database.

> 2) When Exim connects to a keyed host to deliver mail, it only knows
>    about the messages waiting for that host.  However, if the host is
>    one of several MX hosts for a given domain, Exim won't necessarily
>    know about the rest of the hosts waiting for that domain.  This means
>    that there may be messages Exim could have handed over to this host,
>    but won't.


Why not? If there are messages waiting for the host, they should be in
the wait-xxx database.

> I'm pretty certain of (1), but I haven't read enough of the code to be
> sure of (2). I procede assuming that (2) is correct.


Ah, maybe you haven't realized that, if domain xxxx is routed to hosts
A, B, and C, and all of them are unreachable, then the wait-xxx database
is updated with *three* entries, one for each host, each of which lists
the same message.

That's the main reason why rubbish gets left in the database and you
have to run exim_tidydb regularly to clear it away.

> Secondly, Exim would make better use of the few Hotmail connections it
> manages to establish, because it would know about _all_ messages waiting
> for the domain, instead of just those messages waiting for the host to
> which a connection had been established.


It should do that already.

> So what I need to know is whether the acid still hasn't worn off and
> I've completely misunderstood how the wait-xxx DBM files are used, or
> whether it's worth my trying to hack up Exim to key them on domain
> instead of host.


It may be worth it for you, but I do not believe it is right in general
(e.g. the smarthost example). Also, I think you have misunderstood (2).

Philip

--
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.