You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Emmanuel Lecharny <el...@gmail.com> on 2010/05/02 11:28:45 UTC
Lookup operation speedup
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