openldap/slapd extremely slow?

Hi everyone, I'm new here..

I've been trying to install and setup openldap/slapd for some time now with basicly no success. It installs and starts, but it's slow. Really slow. Takes 30 seconds to start slapd from rc.d and requests are really slow as well.

This is on FreeBSD 7.2. I've tried ports and pkg_add -r.

The server I'd like to run this on is admittedly quite old and slow, but everything else runs like a charm and there's more than enough ram. CPU usage is near zero and there appears to be no disk access. I have two ethernet cards, one which isn't connected at the moment.

I tried to follow the handbook and various tutorials with the same results. Default config is the same.

Have anyone seen this before? Any ideas on how to fix? Any other ldap libraries/alternatives?
 
Can you run tcpdump on your interface and look for e.g. DNS requests over the network? Spurious 30 sec delays in networking almost always spell 'failing DSN lookups'. If this is on a LAN, try putting all hosts in /etc/hosts on all machines involved.
 
I'll try that as soon as I can figure out how tcpdump work and let you know the outcome.

In the meanwhile, I can reproduce this on a clean 8.0 installation in vmware. My friend who runs openldap on ubuntu server said rc.d/slapd restart takes few ms, for me it takes 21 secs. I just tried to remove the ethernet card from my virtual machine, and slapd starts in an instant, so your dns lookup guess is probably correct.

But why does slapd try to do a dns lookup in the first place? I just want it local on the server and don't care about network for it at the moment?
 
care to add this to your rc.conf ?

Code:
slapd -h ldap://127.0.0.1

that way you ensure it will only listen locally, and try putting the other network card.
 
Back
Top