• Post Reply Bookmark Topic Watch Topic
  • New Topic

JVM LDAP connection pool size fluctuates unexpectedly  RSS feed

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I'm trying to test out the Java virtual machine connection pool mechanism and seem to be getting some weird results. I'm creating 10000 threads and then bombarding an LDAP server with searches using these threads. We're trying to test out using connection pooling to see if it provides better performance than without connection pooling.

From what I understand, the way connection pooling is supposed to work is that the Java Virtual machine will create a pool of connections which, for the most part should stay consistent and process connection requests as they come in. We are running the connection pool with an initial size of 100, a preferred size of 100, and a maximum size of 100, yet the virtual machine will initially create the pool, but will close some of the connections and then create new connections for the pool on the fly. We don't understand why its doing this. We're catch all exceptions and nothing is being caught. Since the initial size, the max size, and the preferred size are the same, we should always maintain 100 connections within the pool.

The command that we are using to run the application is:

java -Dcom.sun.jndi.ldap.connect.pool.authentication="simple" -Dcom.sun.jndi.ldap.connect.pool.debug="fine" -Dcom.sun.jndi.ldap.connect.pool.initsize=100 -Dcom.sun.jndi.ldap.connect.pool.maxsize=100 -Dcom.sun.jndi.ldap.connect.pool.prefsize=100 -Dcom.sun.jndi.ldap.connect.pool.protocol="plain ssl" -Dcom.sun.jndi.ldap.connect.timeout=300000 ConnTest

If anyone could provide some insight into why this might be happening, it would be extremely helpful. We are using the jrockit-R26.3.0-jdk1.5.0_06 JVM, but this behavior has also been observed when we run our code against the standard SUN Java 1.5 JVM.

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!