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

Re: OpenLDAP performance vs. PostgreSQL

> 2.2.23 (The version in Debian Sarge). Debian hasn't even gotten to 2.3.x in
> unstable yet.

We run Debian too.  But we compile the latest 2.3.x.  Trust us, it's 
worthwhile.  2.3 also has nice index tunables that allow you to build 
arbitrarily-granular indexes, something that's statically defined in 2.2.  
(This may very well be the limitation that's slowing you down, depending on 
your search criteria.)

> The problem is really simple. I have a web-application (mod_perl)
> which have ~100000 users and I'll have to load their individual config
> once per request. I expect heavy load, but very few writes.

PostgreSQL will probably be just fine for this, although LDAP will definitely 
be faster.  Then again, you've got a web application, so you're probably 
going to be using a SQL backend at some point, so it may just make more 
logistical sense to store the data in the RDBMS regardless of performance.

> So... how do I get OpenLDAP to do the equivalent of this ... only
> faster (for the query part)?:

Follow the Admin Guide.  Compile and install 2.3.20 with the recommended 
version of BerkelyDB.  Tune the bdb backend according to the docs, tune slapd 
according to the docs.  

Modify your benchmark to run queries in *parallel* and see which one comes out 
on top.  Try pounding your RDBMS with 64 clients and you'll quickly see the 
performance drop off, whereas OpenLDAP will hardly even touch the CPU and 
still push out thousands of results per second.


John Madden
Sr. UNIX Systems Engineer
Ivy Tech Community College of Indiana