[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
OpenLDAP performance vs. PostgreSQL
- To: OpenLDAP-software@OpenLDAP.org
- Subject: OpenLDAP performance vs. PostgreSQL
- From: Peter Mogensen <apm@mutex.dk>
- Date: Wed, 15 Mar 2006 15:58:18 +0100
- User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050927 Debian/1.7.8-1sarge3
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
The results was (in seconds):
PostgreSQL (7.4.7):
1: 20
2: 10
3: 150
OpenLDAP (2.2.23) (BDB-backend):
1: 185
2: 49
3: -
I didn't bother wait for the last run. ... I was probably way over 1000.
Now it didn't surprise me that LDAP was slower for inserts, but it did
surprise me that it was 5 times slower for lookups on an indexed attribute.
Is this expected behaviour, or should I start looking for som stupid
mistake in my test?
regards,
Peter Mogensen
PS: All request were over TCP and all return-data was just discarded...