[Date Prev][Date Next] [Chronological] [Thread] [Top]

How i can increase performance of OpenLDAP server?



Hello,

# uname -a
SunOS 5.8 Generic_108528-07 sun4u sparc SUNW,Ultra-5_10

# psrinfo -v
Status of processor 0 as of: 07/27/01 13:22:46
Processor has been on-line since 07/20/01 12:04:28.
The sparcv9 processor operates at 360 MHz,
and has a sparcv9 floating point processor.

# top|grep Mem
Memory: 256M real, 114M free, 63M swap in use, 613M swap free


Installed software: OpenLDAP 2.0.11, nss_ldap, pam_ldap.
In base ~1000 records.
Sendmail,  pop3,  imapd  server  programm running (they get user info
login/password from ldap base)


# less slapd.conf
include         /usr/local/etc/openldap/schema/core.schema
include         /usr/local/etc/openldap/schema/cosine.schema
include         /usr/local/etc/openldap/schema/nis.schema
pidfile         /usr/local/var/slapd.pid
argsfile        /usr/local/var/slapd.args
database        ldbm
suffix          "o=DOM, c=ORG"
rootdn          "cn=Manager, o=DOM, c=ORG"
rootpw          secret
directory       /usr/local/var/openldap-ldbm
sizelimit       2
idletimeout     60
index default pres,eq
index objectClass,uid,userPassword,gidNumber,ou
index cn,sn pres,eq,sub
cachesize       1500
dbcachesize     1000000
dbnolocking
dbnosync

# pwd
/usr/local/var/openldap-ldbm
# ls -ls|sort -n
   8 -rw-------   1 root         8192 Jul 25 19:38 nextid.dbb
  25 -rw-------   1 root        24584 Jul 26 12:54 nextid.gdbm
  45 -rw-------   1 root        45080 Jul 27 12:16 gidNumber.gdbm
  45 -rw-------   1 root        45080 Jul 27 12:49 ou.gdbm
  69 -rw-------   1 root        69656 Jul 27 12:13 objectClass.gdbm
 112 -rw-------   1 root       106496 Jul 27 12:13 uid.gdbm
 112 -rw-------   1 root       114968 Jul 27 12:15 userPassword.gdbm
 264 -rw-------   1 root       272030 Jul 26 12:54 dn2id.gdbm
 296 -rw-------   1 root       290816 Jul 25 19:38 dn2id.dbb
 544 -rw-------   1 root       569354 Jul 27 12:27 cn.gdbm
 568 -rw-------   1 root       565762 Jul 26 16:39 id2entry.gdbm
 592 -rw-------   1 root       610314 Jul 27 12:27 sn.gdbm
 608 -rw-------   1 root       614400 Jul 25 19:41 id2entry.dbb


# ls /var/mail|wc -l
     973

# wc -l /etc/passwd
     17 /etc/passwd

(971 files in /var/mail - mail boxes users from ldap base)


# date; time ls -ls /var/mail
Fri Jul 27 13:33:03 MSD 2001
...
...
real     1:22.6
user        1.3
sys         1.0


(number of conn: netstat -n|grep 389)

Fri Jul 27 13:33:08 MSD 2001
Number of conn : 10
load averages: 1.06, 2.15, 2.98 13:33:07
14871 root 8 43 0 10M 9888K run 23:27 19.47% slapd

Fri Jul 27 13:33:15 MSD 2001
Number of conn : 10
load averages: 1.25, 2.16, 2.98 13:33:14
14871 root 8 45 0 10M 9888K run 23:33 39.06% slapd

Fri Jul 27 13:33:23 MSD 2001
Number of conn : 10
load averages: 1.31, 2.15, 2.97 13:33:22
14871 root 8 43 0 10M 9888K run 23:40 54.61% slapd

Fri Jul 27 13:33:30 MSD 2001
Number of conn : 10
load averages: 1.42, 2.16, 2.96 13:33:29
14871 root 8 43 0 10M 9888K run 23:46 63.46% slapd

Fri Jul 27 13:33:37 MSD 2001
Number of conn : 10
load averages: 1.54, 2.16, 2.96 13:33:36
14871 root 8 44 0 10M 9888K run 23:52 69.64% slapd

Fri Jul 27 13:33:44 MSD 2001
Number of conn : 10
load averages: 1.59, 2.16, 2.95 13:33:43
14871 root 8 45 0 10M 9888K run 23:59 74.49% slapd

Fri Jul 27 13:33:51 MSD 2001
Number of conn : 9
load averages: 1.61, 2.15, 2.94 13:33:50
14871 root 8 42 0 10M 9888K run 24:05 77.31% slapd

Fri Jul 27 13:33:58 MSD 2001
Number of conn : 9
load averages: 1.67, 2.15, 2.94 13:33:57
14871 root 8 45 0 10M 9888K run 24:11 79.53% slapd

Fri Jul 27 13:34:06 MSD 2001
Number of conn : 9
load averages: 1.76, 2.16, 2.93 13:34:05
14871 root 8 43 0 10M 9888K run 24:17 80.90% slapd

Fri Jul 27 13:34:13 MSD 2001
Number of conn : 9
load averages: 1.83, 2.16, 2.93 13:34:12
14871 root 8 43 0 10M 9888K run 24:23 81.92% slapd

Fri Jul 27 13:34:20 MSD 2001
Number of conn : 9
load averages: 1.82, 2.15, 2.92 13:34:19
14871 root 8 43 0 10M 9888K run 24:30 83.42% slapd

Fri Jul 27 13:34:26 MSD 2001
Number of conn : 9
load averages: 1.82, 2.14, 2.91 13:34:26
14871 root 9 33 0 10M 9896K sleep 24:35 83.70% slapd


WOW! :-/


I think, that 84% CPU for `ls -ls` command is VERY much... :(


How can i:

1. Increase performance of ldap base?
   (i read the http://www.openldap.org/faq/data/cache/190.html)
2. Decrease loading of CPU?


What hardware i need for serve ldap base with ~1000 records?


thank you,

-- 
Best regards from future,
HillDale.
Pavel                          mailto:mcfly@jet.msk.su