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

Pàgina inicial
Delete this message
Reply to this message
Autor: Douglas Gray Stephens
Data:  
A: Christian Balzer
CC: exim-users
Assumpte: Re: [Exim] Performance comparison, LDAP vs. lsearch
At 15:46 (GMT+0900) on 23-January-2003, 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.
>
> Lets assume that there are no I/O, network or CPU bottlenecks in either
> scenario, what I'm trying to compare here is the cost (time wise) in
> query setup and execution.
> A further assumption would be that for each mail/address a total of 20
> lookups will be required. I can hear the shouts of "Twenty? How did the
> loon wind up with that high number?" already, but it's a good estimate
> for what I have in mind.
>
> With LDAP one is looking at the overhead to establish a TCP connection to
> a remote system, but the database queries are of course a lot faster than
> lsearch (at least after a certain DB size).


A few extra items to put into the melting pot:
 1.  You could run the LDAP server on the localhost, and so avoid any
     of the network latency
 2.  LDAP has the ability to keep connection(s) open, so once there
     would be a one time hit on estabilishing the connection(s), but
     once the connections are in place there should be few overheads.
     Of course this depends on the way that emim talks to LDAP.
 3.  The LDAP server performance will depend on what indices are
     available.


I believe that with LDAP, exim will establish a connection to the ldap
server during a message delivery, and keeps that session open, so that
all ldapsearches go down the same connection. Hence if you have 20
lookups, 19 of those will not involve the overhead of setting up the
LDAP connection.

I hope this helps,

Douglas.

> With lsearch the TCP overhead is gone, the files will be completely cached
> for all practical purposes and fast, up a point.
>
> Right now one example would be a 140KB file with 7500 addresses in it
> (users that have a specific spam filtering activated) which seems faster
> or at least as fast as LDAP.
>
> My gut feeling is that lsearch would do fine (on this particular hardware)
> up to about 1MB file size and 50000 addresses before LDAP becomes a
> decisively better choice.
>
> Any (educated) guesses and insights how realistic this is and where that
> break even point might be?
>
> Regards,
>
 > Christian Balzer
 > --
 > Christian Balzer        Network Engineer        Engineering
 > chibi@???       Global OnLine Japan/Exodus Communications K.K.
 > http://www.gol.com/

>
>
>


--

================================
Douglas GRAY STEPHENS
Technical Architect (Directories)
Schlumberger Cambridge Research
High Cross,
Madingley Road,
Cambridge.
CB3 0EL
ENGLAND

Phone  +44 1223 325295
Mobile +44 773 0051628
Fax    +44 1223 311830
Email DGrayStephens@???
================================