----------------------------------------
Date: Fri, 24 May 2013 07:48:55 -0700
From: hyc(a)symas.com
To: ctcard(a)hotmail.com; openldap-technical(a)openldap.org
Subject: Re: ldap query performance issue
Chris Card wrote:
>>>> Any ideas?
>>>
>>> Increase the IDL range. This is how I do it:
>>>
>>> --- openldap-2.4.35/servers/slapd/back-bdb/idl.h.orig 2011-02-17
>>> 16:32:02.598593211 -0800
>>> +++ openldap-2.4.35/servers/slapd/back-bdb/idl.h 2011-02-17
>>> 16:32:08.937757993 -0800
>>> @@ -20,7 +20,7 @@
>>> /* IDL sizes - likely should be even bigger
>>> * limiting factors: sizeof(ID), thread stack size
>>> */
>>> -#define BDB_IDL_LOGN 16 /* DB_SIZE is 2^16, UM_SIZE is 2^17
>>> */
>>> +#define BDB_IDL_LOGN 17 /* DB_SIZE is 2^16, UM_SIZE is 2^17
>>> */
>>> #define BDB_IDL_DB_SIZE (1<<BDB_IDL_LOGN)
>>> #define BDB_IDL_UM_SIZE (1<<(BDB_IDL_LOGN+1))
>>> #define BDB_IDL_UM_SIZEOF (BDB_IDL_UM_SIZE * sizeof(ID))
>> Thanks, that looks like it might be the issue. Unfortunately I only see the issue
in production, so patching it might be a pain.
> I've tried this change, but it made no difference to the performance of the
query.
You have to re-create all of the relevant indices as well. Also, it's always
possible that some slots in your index are still too big, even for this
increased size.
Thanks Howard.
I had to increase BDB_IDL_LOGN to 18 (also increasing the stack size) and rebuild the
objectclass index, but the query is now sub-second.
You should also test this query with your data loaded into back-mdb.
I intend to look at using back-mdb instead of back-bdb soon, as well as upgrading to
the latest openldap release. When do you expect 2.4.36 to be available?
Chris