Re: [exim] write support for db hash files on TODO?

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Mike Grice
Data:  
Para: Radim Kolar
CC: exim users
Asunto: Re: [exim] write support for db hash files on TODO?
On 27 Aug 2006, at 11:25, Radim Kolar wrote:

> Are there any plans to implement write support for .db (Berkeley
> db) files?
> Exim can read them, but not write.
>
> It would be very useful because SQL access is much slower than
> simple hash-file
> and SQL connections have not fast start up.


You'd be surprised.

1) To write to a berkeley db, you need to get an exclusive write
lock. This can cause other processes to deadlock while they are
waiting. See any comparable system where contention is high, it can
really be a sticking point that brings the whole thing crashing down
round you (example: shared SpamAssassin AWL or Bayes DB). With SQL
you can generally implement a table schema that can use row-level
locking (such as InnoDB), which would eliminate deadlocks in this way
at least.

2) Most apps supporting SQL that are worth their salt either use
persistant connections or reuse query data. You can speed things up
in exim by doing a large initial query (as long as you've normalised
your tables properly and have a nice, efficient query selecting
across keys) that will then store all applicable variables for re-use
by exim later on. Persistant connections will make initial
connections to the DB and re-use them, cutting down on startup time.

3) Berkeley DB doesn't work over NFS. Period.

4) Consider running a lightweight MySQL slave on your exim machine
itself; I have done this many times to great effect (as well as a
local caching nameserver instance).

Cheers,

Mike.

--
Stylin' infinite and passion // Make me mash on