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

Re: fast slapcat and slow slapadd



On Tuesday 15 April 2008 23:30:18 Piotr Wadas wrote:
> Hello,
> Using openldap 2.3.38 on 2.6.24 with bdb/hdb backend.
>
> I got about 12-13 000 entries in my directory.
> Slapcat takes seconds, while slapadd takes 15 minutes or more.

Your tuning doesn't seem sufficient, slapadding 13000 entries should take 
under 1 minute.

> Is there any way to speed it up, which I've missed?
>
> to slapadd I do:
>
> /etc/init.d/slapd stop &&
>
> cd /var/lib/ldap && ls |grep -v DB_CONFIG|xargs rm &&
>
> cat slapcat-output-file|slapadd

Use -q flag? You don't show your DB_CONFIG file, so we can't offer many 
accurate suggestions there.

> currently the best way to minimize downtime I found
> is to replace "directory" line in slapd.conf, then
> do slapadd "into" new physical location, and then
> just stop slapd, change dirname, change directory line back,
> and start again.

The best way to minimise downtime is to not need to do an import. Why are you 
exporting/importing so often that you have downtime?

> I'm afraid it's actually not slapd issue, but just
> some file-reading/adding -related thing.
>
> Is it some better workaround for this with newer release?

Workaround for what?

> I'd be happy to jump to 2.4.7 series

Why do you think things would be so much better on 2.4 (2.4.8 is current), 
assuming no other changes in your environment? While there are improvements, 
some which would affect this, the fact that your slapadd is more than an 
order of magnitude slower than it should be on 2.3 seems to indicate that 
even a 20% performance improvement between 2.3 and 2.4 wouldn't really help 
you much ...