Re: [Exim] Performance comparison, LDAP vs. lsearch

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Hugh Sasse Staff Elec Eng
Data:  
Para: Nico Erfurth
CC: Christian Balzer, exim-users
Asunto: Re: [Exim] Performance comparison, LDAP vs. lsearch
On Thu, 23 Jan 2003, Nico Erfurth wrote:

> Christian Balzer wrote:
> > Hello,
> >
> > I'm trying to get a rough, rule of thumb, ballpark figure of where
> > the break even point of doing lsearch local file lookups versus ones
> > to a remote LDAP database might be.
>
> You are comparing apples and oranges.


And they are both subclasses of edible fruit! I think this is a
perfectly fair question as put, for a "back of the envelope" type
model of how how a system should be developed (see for example
"Programming Pearls" for lots of remarks on the utility of this kind
of calculation).

> Lsearch is really slow, does not use indexing, and with more entries it
> becomes slower and slower.


But is probably less effort to setup so that it works, and may have
less compatibility options with database solutions which may
change... At least one programming book I know advocates keeping
knowledge in plain text where possible (Thomas, Hunt, "The Pragmatic
Programmer", Addison Wesley), so simplicity may be an important
reason for staying with lsearch until you reach the breakpoint.

> If you want a filebased system, use dddbm, or better cdb.


Why "better" for cdb if such comparisons are meaningless? :-)
(The databases are stuctured differently, I know). The point I'm
making here is that the choice of database depends on information
which is going to be variable, but there are often rules of thumb,
like the Unix Aphorism
( http://www.biostat.wisc.edu/~annis/commentary.html#3 ) that swap
is three times real memory, which are helpful even if not universally
applicable.

        [...]

> > With LDAP one is looking at the overhead to establish a TCP connection to

        [...]

> > With lsearch the TCP overhead is gone, the files will be completely cached
> > for all practical purposes and fast, up a point.
>
> Never compare a flatfile with an indexed database.


The choice is presented by both being available within Exim. If it
was never appropriate to use flat files for anything I'm sure Exim
would not support them, or they'd be documented as being deprecated.
Since you can use either in the same place this is a design
decision, all that is being asked here is some information on how to
make that decision. I'm in the same position: I have kept my system
as simple as possible, but such breakpoints are worth knowing about.

        Hugh