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

Re: performance tuning

On Thu, Jan 02, 2003 at 02:55:17PM -0600, Chuck Pierce wrote:

> Does anyone have any suggestions on where to start performance tuning openldap?


> I've got a dual processor system (Sun E450) that is getting pretty hammered.  I
> can grow the box to 4 processors, but I didn't know if that would help (is
> openldap multi-threaded?).
> The database is pretty small (~2000 records) and pretty flat (only three or so
> levels).  It's just user info for user logins (eg, username, password, gecos,
> etc).

The size is less important than the number of queries per second. If
your 2000 entries represent say 1000 office workers who all log on in
the space of 30 minutes each morning then you might expect to see
10*1000/(30*60) = ~5 operations/sec during that period, and between
1000 and 2000 persistent connections during the day. (This assumes
that each person has their own Red Hat 7.2 desktop machine - other
clients will impose different loads). See:


for more info on the load issue.

5 ops/s should be easy for an E450 if you get the indexing right,
though maintaining 1000 open connections is more of an issue. Also,
CPU load will be much higher if you use SSL or TLS connections to the
LDAP server.

Wind up the log level to 768 and look at the incoming queries (SRCH
lines). Make sure you have an index for every attribute type that
appears in the common searches. If you have a query load above 10/s
you may want to reduce the log level once you have checked this, as
logging itself can impose quite a load.

If using the ldbm backend, you may need to set explicit cache sizes,

# number of entries to cache
cachesize 3000
# bytes per open index file
dbcachesize 3000000

If you do this, make sure you do not exceed the physical memory size
as you do not want slapd to get paged out.

|                 From Andrew Findlay, Skills 1st Ltd                 |
| Consultant in large-scale systems, networks, and directory services |
|     http://www.skills-1st.co.uk/                +44 1628 782565     |