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

Re: OpenLDAP performance vs. PostgreSQL



Peter Mogensen wrote:
Hi,

An often heard argument for LDAP is that it is optimized for many reads
and only a few writes. ... And it seems intuitively reasonable that it
should be faster than an RDBMS for such applications.

Now... I have a lot of configuration data for many users, which I need
to query very often and write very seldom. There's not many relational
contraints in it, so I figured OpenLDAP would be better than PostgreSQL.

But a quick test using Perl DBD::Pg and Net::LDAP shows me that this
might not be the case. In short I tried to:
1 Insert 20000 simple objects with index on PK/DN
2 Query 20000 objects on the indexed attribute
3 Query 10000 objects on a non-indexed attribute

It's not reasonable to do any performance measurements using Net::LDAP since that module is fully implemented in perl and has extremely slow performance. Net::LDAPapi would be more suitable. (I gather that Mozilla::LDAP is an updated version of this package.)


Also, assuming that you rule out the overhead of script interpretation/execution, you haven't said anything about whether you bothered to configure back-bdb with appropriate cache settings etc.

--
 -- Howard Chu
 Chief Architect, Symas Corp.  http://www.symas.com
 Director, Highland Sun        http://highlandsun.com/hyc
 OpenLDAP Core Team            http://www.openldap.org/project/