[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: LDAP server scaling problem?



[José Luis Redrejo Rodríguez]
> I've used 300 and 600 with good results in both cases. 

Right.  It might also be a good idea to use a similar timeout on the
clients (in nslcd or sssd).

I ran a small test to see how many LDAP connections each client uses on
the problematic Skolelinux/Lenny installation, where the LDAP server
have been unstable.

I ran this code to get the number of LDAP connections per client:

  netstat -a | grep :ldap | awk '{print $5}' | cut -d: -f1 | sort |
    uniq -c | sort -n

It told me that most clients had 5 connections open, while the main
server had 25 connections open.  Some clients had 6-9 connections open
part of the time.  I haven't checked, but suspect this happen when cron
jobs run.

So with 1024 as the limit for open files, the number of clients can be
somewhere between (1024-25)/5 = 199 and (1024-25)/9 = 111.

I've added 'umask -n 8192' to /etc/default/slapd to increase the limit,
and this should make it possible to handle between (8192-25)/5 = 1633
and (8192-25)/9 = 907 clients.

This do not seem to be the only problem with the LDAP server in Lenny,
but I have not yet been able to understand and identify what is going
on.  Increasing the number of threads in slapd (using threads 50 in
slapd.conf) seem to reduce the impact, but it might also be because of
other settings.  I am still investigating this.

I suspect we need to ensure the Squeeze version have at least 8192 as
its openfile limit.
-- 
Happy hacking
Petter Reinholdtsen


Reply to: