directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lecharny <elecha...@gmail.com>
Subject Lookup operation speedup
Date Sun, 02 May 2010 09:28:45 GMT
Hi guys,

here is a sum up of the tests done on the lookup operation

1) When doing a lookup without calling the network layer, we get 
something around 20 000 operation per second.
This went up from 9000 lookups per second by improving the existing code :
- no call to hasEntry()
- improvement in the DN construction

2) Calling the LdapConnection.lookup() with the network layer.
The test was done with the API and with JNDI. In both cases, perfs are 
awful : 2000 req/s
- Some improvement have been done in the Ldap API, as an AbandonRequest 
was sent for every request

The gain is minor.

Having added some tracing in the code, it shown that calling the 
CoreSession.lookup() method takes an average of 50 nano seconds, when a 
call to the SearchHandler.doSimpleSearch cost 240 nano seconds (4.5 
times more).

The difference is between getting around 19 000 lookups done per second 
and 4200 per second. The extra work done to decode and encode the PDU, 
plus the network processing cost 250 more nano seconds for a maximum of 
2000 lookups per second.

At this point, it's clear we can do a few things :
- detect a lookup operation when receiving a search request, if the 
scope is OBJECT and the filter is '(objectClass=*)'and then call the 
lookup method, which is way faster
- improve the encoding/decoding process (we can remove the transformer, 
assuming that we modify the classes inheritance scheme
- disable the messageSent event which cost some processing time
- Improve MINA so that we don't establish useless statistics when not needed

-- 
Regards,
Cordialement,
Emmanuel L├ęcharny
www.nextury.com



Mime
View raw message