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

Re: Performance with OpenLDAP 2.0.26 and Samba



On Sun, Sep 22, 2002 at 08:39:46PM +0200, root wrote:

> index   sn,uid,mail             eq,sub
> index   objectClass             pres,eq
> index   uidNumber,gidNumber,rid eq

> I need the "mail" index for postfix. All others are more or less guesswork
> from me.

A good way to decide on indexes is to run slapd with ststs logging on
(loglevel 256, or 768 if you want more detail). Scan the log for
'SRCH' entries and look at the filter used by each of them to find out
what the LDAP clients are asking for.

Create an index on every attribute that gets used in filters: most
should be indexed for 'pres,eq,sub' and objectClass should be indexed
for 'pres,eq' whether you see it being used or not.

[ Some user-interfaces that use LDAP produce extremely large filters,
typically 20-30 clauses of the form 'mail=XXX OR cn=XXX OR street=XXX
OR favouriteDrink=XXX OR spouse=XXX ...' - these cannot realistically
be handled by indexing, and the only real solution is to apply pressure
to the developers to use more sensible searches. You may be able to
speed them up a bit by setting very large cache sizes so that the whole
database stays in memory, but they will still hammer your CPU. ]

> The Server has enough RAM (1GB) but CPU is short (1GHz PIII).

That is more than enough power for the job you describe.

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