[Samba] Samba 4 LDAP/LDB search speed
Roel van Meer
roel at 1afa.com
Tue Sep 30 05:51:45 MDT 2014
Hi list,
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.
While testing, it seems that the S4 LDAP server is a lot slower than
OpenLDAP. So, I would like to ask two questions:
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.
2. Are there settings in the config that can improve the performance of the
LDAP server?
Currently, I'm testing with a simple shell script that runs an ldapsearch
command that retrieves a single user entry, 1000 times (see below). With
OpenLDAP, this takes about 2.5 seconds, with Samba 4 it takes around 30
seconds. This is with samba 4.1.11, ldb 1.1.17. The database has around 300
entries, not following the returned references.
I've tried using Matthieu Patou's patches from
http://git.samba.org/?p=mat/samba.git;a=shortlog;h=refs/heads/ldb_perfs
on my ldb, but that did not notably change the speed (which might very well
be that I am not testing correctly).
Thanks for any info on this!
Regards,
Roel
#!/bin/sh
for i in `seq 1 1000`; do
ldapsearch -x -h localhost -p 389 -D cn=dago,cn=Users,dc=s4,dc=local \
-w password '(&(objectclass=user)(cn=dago))' &>/dev/null
errno=$?
if [ "$errno" != 0 ]; then
echo "break at $i"
break
fi
echo $i
done
More information about the samba
mailing list