Re: [Exim] MySQL persistant?

Top Page
Delete this message
Reply to this message
Author: Daniel Tiefnig
Date:  
To: exim-users
Subject: Re: [Exim] MySQL persistant?
Eli wrote:
>> Does Exim set up the MySQL connection in the parent listener
>> process (-bd switch), and then pass on the open connection to all
>> of its forked children, or does a new connection have to be built
>> for each child that needs to do a query?
>
> To my knowledge, no it doesn't.


It does not, yes. (Can't, as it doesn't fork for delivery, but exec())

> However it does cache connections for the same process, and I believe
> it even caches the last lookup in case it's used again.


Well, I'd like to note, that I'd love to see exim caching a few more
MySQL queries/results, as just one single query cache is to less in many
setups. Anyone into making the cache an array instead of a simple scalar?

> If you plan on having a mail server take in 1000+ connections
> concurrently, might I suggest looking towards setting up a cluster of
> email servers and putting them behind a load balancer. On each mail
> server, have them run a local MySQL server which is set to slave off
> of one master server.


That's exactly what we're running here, and it works quite well,
performance being little bit bader than with DMB Files, though. But I'm
accepting that for a bunch of flexibility this gives to me. I think the
major point is to minimize MySQL lookups, so trying to get as much of
information in one lookup is a good idea. One may then repeat this
lookup many times, as the last query/result is cached...


lg,
daniel