0

I am trying to upgrade a web application made in Java EE, using Tomcat. Till now I have been using the Netscape ldap implementation, and now I am trying to upgrade to Unboundid Ldap. The problem is that the Unboundid implementation has a very high delay comparing to the netscape implementation.

Some info on what I am planning to do: I want to get from LDAP the last 5 entries, put them in an array and display this array in a webpage.

EDIT1: I have created 2 sample apps for testing the libraries, using Java SE. For each test I have attached the source code and the server side LDAP log.

The results are the same, no matter how may iterations I use, it takes on average much longer to retrieve the results using the UnboundID SDK implementation.

For Netscape LDAP SDK: code and log. For UnboundID LDAP SDK: code and log

EDIT2: I am also trying to use the ldap-debugger tool, provided by UnboundID, but I can't figure how to make it work, I see that it takes as arguments the ip and port on which to bind, and the clients should connect the the ldap-debugger and he will act as a proxy, but where do I specify the server ip and port, because in the client I've already put the ip and port for ldap-debugger ?

4

1 回答 1

0

关于您正在使用的代码,没有任何内容可以立即跳出来。在我的测试中,UnboundID LDAP SDK 比 Netscape SDK 快得多。虽然您肯定有可能找到某种极端情况,但我想排除其他一些可能性。

首先,您如何确定每个版本的执行时间?您是在使用客户端计时(例如,System.currentTimeMillis(),再次运行代码、System.currentTimeMillis())还是服务器端计时(例如,服务器访问日志中报告的处理时间)?如果差异只存在于客户端,那肯定是 SDK 的问题,但如果差异也出现在服务器端,那么可能是正在发送的请求有所不同,导致服务器执行更多操作在一种情况下工作而不是另一种情况。您可能会使用 UnboundID LDAP SDK 提供的 ldap-debugger 工具来准确调查正在发生的通信。

作为性能测量的一部分,您是否尝试过多次(例如,100,000 次)在紧密循环中运行每个?这可以帮助确保所有必要的 JIT 编译都已执行,垃圾收集不会出现问题,并且潜在的服务器繁忙不是问题。如果您的结论仅基于每段代码的一次运行,那么很难从中得出任何真正的结论。

如果它确实看起来是客户端问题,那么如果您能提供更具体的细节,我将不胜感激,以便我可以更彻底地调查问题。特别是,准确查看正在发送哪些请求以及返回哪些条目会很有帮助(信息可以匿名化,这样它就不会泄露任何敏感数据,只要它仍然表现出相同的性能特征) . 如果您愿意私下提供信息,可以将信息发送至 ldapsdk-support@unboundid.com。

于 2014-02-28T19:22:31.230 回答