directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lécharny <>
Subject Re: Some idea to speedup the search...
Date Thu, 16 May 2013 15:58:59 GMT
Le 5/16/13 5:00 PM, Kiran Ayyagari a écrit :
> On Thu, May 16, 2013 at 7:56 PM, Emmanuel Lécharny <>wrote:
>> Hi guys,
>> as I profiled the server yesterday, I got some interesting results for a
>> Lookup operation :
>> - 30% is spent in the cloning of the entry we fetch from the backend
>> - 11% is spent in the filtering of AT we don't want to send back to the
>> user
>> - 16% is spent in the creation of the DN
>> We already have discussed extensively about the idea to write a wrapper
>> around the backend entries, which gather the actions to apply to AT,
>> instead of cloning the full entry. This is definitively something we
>> want to experiment later
>> I had another idea : creating an UUID -> DN cache. The only issue we
>> have is when we process a MODDN operation, because we ay have to
>> invalidate a lot of elements from the cache. But all in all, why don't
>> we simply invalidate the whole cache when the MODDN operation is
>> processed ? ALl in all, a MODDN operation is not that frequent, and we
>> just lose the cache...
>> In the day to day operation, the gain will be just huge, for a very
>> limitd amount of work...
> we already do the same in external entry cache, here all entries will
> contain the complet DN (unlike just RDN in those stored in the partition
> store)
> so if an entry is in this cache then we just return the entry without
> building the DN

I'm sorry, this is not a pb in the AsbtractBTreePartition, but higher,
in the DefaultSearchEngine :

    public PartitionSearchResult computeResult( SchemaManager
schemaManager, SearchOperationContext searchContext )
        throws Exception
        Dn baseDn = searchContext.getDn();

        // Compute the UUID of the baseDN entry
        String baseId = db.getEntryId( baseDn );

Here, we are looking for the UUID of the associated entry. A DN -> UUID
cache would save a lot of CPU.

Emmanuel Lécharny 

View raw message