OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: (patch) Enhanced MySQL driver

From: Leandro Santi (lesantiuolsinectis.com.ar)
Date: Wed Jun 11 2003 - 21:30:44 CDT


On Wed, Jun 11, 2003, Victor.Duchovnimorganstanley.com wrote:
> On Wed, 11 Jun 2003, Leandro Santi wrote:
>
> > Ok. First let me see if I understand clearly. With my current solution
> > (ie deterministic round robin), if I list a nonresponding IP as the
> > first server, then I can only hope to receive (100/N*timeout) messages
> > per second (I guess 100 is the default maximum number of spawned
> > smtpd procs) *if* one of the following is true:
> >
> > (a) The process blindly connects to the MySQL backend at map
> > initialization time (thus each process'll wait N*timeout seconds) (BTW
> > this is not the behavior of dict_mysql nor my patched version);
>
> Yes, this throttles the process creation rate and so also the message
> throughput.
>
> >
> > or
> >
> > (b) The process connects to the backend when the first query comes in
> > *and* theres at least one query per message for each of the N
> > connections.
>
> No. In this case the throughput limit is P*100/N*timeout, where P is the
> process limit and N is the number of maps that the process opens during
> its lifetime. Each of P processes delivers 100 messages per N*timeout
> interval.

Ok, I think I understand now. Case (b) doesn't limit the process creation
rate, so the master process will get the MASTER_STAT_TAKEN message quickly,
and so will spawn other instances sooner (P at most), hence the throughput
is better. This is -happily- the behavior of the native dict_mysql code.

Thanks for pointing this out, I think I clearly understand you now :)

Leandro.