OpenLDAP MDB vs HDB performance: Difference between revisions
No edit summary |
|||
Line 18: | Line 18: | ||
=== Search time === | === Search time === | ||
This is the time to search the entire db via | This is the time to search the entire db via ldapaddadd. Note that with hdb, since it has to preload the cache, two times are given. cold (Cache not loaded) and hot (cache loaded). mdb never needs to preload the cache. | ||
mdb: 0m1.435s | mdb: 0m1.435s | ||
hdb cold: 0m5.304s | hdb cold: 0m5.304s |
Revision as of 23:47, 21 February 2013
Article Information |
---|
This article applies to the following ZCS versions. |
Zimbra OpenLDAP Server
Performance differences between the mdb and hdb backends for OpenLDAP
Using real-world client data, I've compiled some brief performance differences between using the mdb and hdb backends to OpenLDAP with Zimbra. This particular client has 25,208 entries in their LDAP database. I dumped their accesslog and converted it to LDIF to give me a full weeks worth of real change data, and then ran that back against the database. This results in approximately 28,000 modifications performed against the DB.
Database load
This is the amount of time to load the database using slapadd -q
mdb: 0m11.237s hdb: 0m38.727s
Advantage: MDB. It is 3.45 times faster loading the data than hdb.
Database size
Size of database on disk after slapadd completes. For hdb, this includes the hdb cache as well as db size. mdb has no cache.
mdb: 296MB hdb: 627MB
Advantage: MDB. It is 2.11 times smaller than the hdb database.
Search time
This is the time to search the entire db via ldapaddadd. Note that with hdb, since it has to preload the cache, two times are given. cold (Cache not loaded) and hot (cache loaded). mdb never needs to preload the cache.
mdb: 0m1.435s hdb cold: 0m5.304s hdb hot: 0m3.103s
Advantage MDB. It is 2.16 times faster than hdb on the hot hdb search. Note that hdb performance degrades as the number of concurrent searches increases, while mdb performance is static.
Write performance
The following write performance was done with the 28,000 modification LDIF described above. It was done two ways -- Single node (no replication setup) and Master node (accesslog delta-sync database enabled). Time to do all 28,000 modifications is tracked. In the master node scenario, the size of the resulting accesslog DB is also compared.
Single node
mdb: 0m14.013s hdb: 13m3.394s
Advantage: MDB. It is 55.90 times faster than hdb at performing 28,000 modifications.
Master node
mdb: 0m20.628s hdb: 25m46.477s
Advantage: MDB. It is 74.97 times faster than hdb at performing 28,000 modifications.
Master node accesslog DB sizes
mdb: 100M hdb: 234M
Advantage: MDB. It is 2.34 times smaller than the hdb accesslog DB.