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

Re: slapindex performance?

Oh! Thanks a lot for your suggestions.

We're using the latest stable release of 2.3.19. I'm on a Centos (Linux flavor).

I had started running the reindexing sometime back. Will it be a problem if I quit it midway and db_recover the data? Or should I just allow it to go through the entire thing.


Quanah Gibson-Mount wrote:

--On Friday, February 24, 2006 7:52 PM -0800 Krishna Sivaramapuram <krishna@everyone.net> wrote:

I'm trying to reindex my slapd database (bdb) since I added one more
equality index. My db has more than 6M entries. I'm trying to see how
long this will take... I didn't find any proper reference in the web. Has
anyone done something similar and have any performance data on slapindex?

What version of OpenLDAP are you using?

I would suggest (of course) OpenLDAP 2.3. In OpenLDAP 2.3, there are two things that massively improve the speed of slapindex (which is slower than slapadd in all previous releases). They are:

The "-q" option, to run it via "quick"
The ability to set "tool-threads", which will allow slapindex to use multiple CPU's while indexing your DB.

Also, if you are adding a brand new index, there is no need to re-index all your existing indices. You only need to index what is new, which will also speed up slapindex. I.e.,

stop slapd

edit slapd.conf, commenting out all indices except the new one(s).

Run slapindex -q with an appropriate amount of tool-threads (1 per CPU, so on a 2 CPU system, tool-threads 2, etc)

After it is done, edit slapd.conf, uncommenting your pre-existing indices.

restart slapd.


Quanah Gibson-Mount
Principal Software Developer
ITS/Shared Application Services
Stanford University
GnuPG Public Key: http://www.stanford.edu/~quanah/pgp.html