[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: OpenLDAP performance vs. PostgreSQL

John Madden wrote:
>>set_cachesize   0       52428800        0
> This is likely not enough cache.

50 Mb, not enough?

>  Are you seeing any IO at all?  (You 
> shouldn't be.) 

No... I dont' see much IO during searches.

> Make sure you've turned off logging in slapd.conf unless you 
> really want it.  (Big impact on performance.)

loglevel is 0

> Check the cachesize and idlcachesize options.  You should be able to have 
> "cachesize 20000" to hold the entire DB in memory.

increasing both to 20000 didn't seem to make it better. :(

> Here's a problem: You've got $mesg defined INSIDE your for() loop, meaning you 
> incur object creation overhead on each iteration.  Because the search is 
> performed instantly, i.e., you can't define $mesg once and reuse it 20k times 
> (as you can with DBD::Pg), I don't think this test is going to be an 
> effective measure of OpenLDAP's performance.  Howard suggested other 
> libraries -- perhaps they provide "prepare" and "execute" methods separately?

Hmm... I didn't actually think DBD::Pg really supported prepare/execute,
but I can see that it started to with 7.4, so maybe it gives an
advantage. (prior to 7.4 prepare was just client side sugar).

If I find out how to make OpenLDAP outperform PostgreSQL for this kind
of application, maybe I should try write a HOWTO... else I guess people
will just keep stuffing flat data into SQL databases from Perl :) At
least it's relatively easy to get decent performance with DBD::Pg.