[Samba] Samba 4 LDAP/LDB search speed

Marc Muehlfeld mmuehlfeld at samba.org
Tue Sep 30 11:49:35 MDT 2014

Hello Roel,

Am 30.09.2014 um 13:51 schrieb Roel van Meer:
> we're in the process of converting our Samba 3 / OpenLDAP systems to
> Samba4. Since these machines also run applications (Postfix, Zarafa)
> that retrieve their information from LDAP, performance of the LDAP
> server is quite important to us.

When you say converting from Samba 3 to Samba 4 do you mean migrating
your NT4-domain to an Samba AD or continue using Samba 4 as an NT4 domain?

> While testing, it seems that the S4 LDAP server is a lot slower than
> OpenLDAP.

Based on that, I guess you ment you want to switch over to Samba AD.

> 1. What is the expected performance of the S4 LDAP server? E.g. if
> someone could give me a rough estimate on the number of simple queries
> per second on average hardware, then I can see if my setup is performing
> as expected or not.

We can't say that in general. This depents on many things, like how many
objects you are storing in your AD (users, accounts, groups), AD
features you use and their configuration (e. g. tombstone lifetime), and
surely also about the amount of additional ACLs (e. g. if you have many

Please give some more information about your environment and the
expected size of your database. Then surely someone here with a similar
installation size can tell you some experiences.

If I output all entries of my small test environment which have an 'cn'
(3441 records), it's done quite fast:

# time ldbsearch -H /usr/local/samba/private/sam.ldb cn=* --cross-ncs >
/dev/null 2>&1

real    0m0.719s
user    0m0.594s
sys     0m0.088s

Doing the same via network against the second DC:

# time ldbsearch -H ldap://DC2:389 cn=* --cross-ncs
-Uadministrator%xxxxx > /dev/null 2>&1

real    0m1.082s
user    0m0.418s
sys     0m0.038s


More information about the samba mailing list