[Date Prev][Date Next]
Re: ldap is too slow, even uncommunicable.
Note that it's best to not hijack threads. Those of us that use
thread-aware clients have a hard time following things if random
messages appear in the middle of other threads.
Bruno Lopes de Souza Benchimol wanted us to know:
>When I do ldapsearch -x -z 0 -l 0 , I get:
># search result
>result: 4 Size limit exceeded
># numResponses: 501
># numEntries: 500
>Although I got 583 entries, I checked this using:
>ldap:/etc/ldap# slapcat |grep ^dn|wc -l
The default limit is 500. If you want the -z 0 to work, you must bind
as the rootdn.
>Basically when I put my samba servers (I got 2) it start getting slow slow
>slow ... until I get cant connect to ldap server.
>Sep 9 10:03:27 smb smbd: failed to bind to server with dn=
>cn=admin, dc=tcm, dc=pa, dc=gov, dc=br Error: Can't contact LDAP server
>Or either with ldapsearch: Can't connect to LDAP Server.
Samba is searching for some attribute that is not indexed. Google
around for samba slapd.conf indexes and make sure you have all of them
in there. Another way to do it is to tcpdump one session and see what
lookups its doing, then do them manually. Anything that doesn't return
an instant answer is unindexed and inefficient and is what is slowing
your ldap responses down, which drags everything down, eventually
bumping you up against some limit, either OS limit or process limit.
>Here follows my slapd.conf (important sections):
>rest is default like access lists, index, etc, im using slapd
>2.0.23-6.3 , from Debian, 3.0r2 (stable)
Let's see the indexes you are using.
>Also I get like 20 established connections to my LDAP server and around 60
>with either SYN_RECV/CLOSE_WAIT on netstat , all by samba server.
>ldap:/var/lib/ldap# du -sh *
so your indexes are cn, mail, mailAlternateAddress, objectclass, sn, and
uid. Samba is searching for other attributes besides just those. That
is what I suspect is slowing you down. Again, look for someone's samba
slapd.conf index configuration in various samba/ldap HOWTOs.
They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety. --Benjamin Franklin
Linux kernel 2.6.3-16mdkenterprise 2 users, load average: 0.27, 0.16, 0.06