2 Replies Latest reply on Aug 3, 2007 2:41 AM by lorenz fischer

    JNDI datasource connection pooling

    lorenz fischer Newbie

      hi all,

      i'm trying to find the optimal settings for the parameters min-pool-size and max-pool-size for my jndi datasource which connects to a oracle database.

      does anybody know of a good site, doc or forum post that describes those parameters (thoroughly)?

      as far as i'm concerned the min-pool-size defines the number of connections that (once opened) stay open even if the connections are idle. the max-pool-size parameter defines how many connections can be handled by the pool concurrently at max. so all the connections between min and max-pool-size are closed (if idle for at least idle-timeout-minutes) and reopened (if more than min-pool-size connections are required) again.

      on some site (unfortunately lost the link) i once read, that setting the min-pool-size equal to the max-pool-size might result in a performance gain since jboss does not need in any case to close/reopen database connections. does anybody have experience with that? another question - given an unlimited amount of available connections - is there any reason not to set the two parameters equal to each other; except for the fact, that there might be max-pool-size connections to the database idling?

      any hints are greatly appreciated :-)

      cheers
      lorenz

        • 1. Re: JNDI datasource connection pooling
          Mark Spritzler Apprentice

          This is what I have read and seen. Unfortunately there is no stead fast true rule for those settings. It is always a depends on many factors. I have never heard to set them to the same setting, but the more Connections you have created the more memory it takes up. Obviously constantly creating and removing these objects have an effect/affect in some way.

          But the golden rule it to do profiling and load testing on it. There is one performance tuning technique where you tune the wait states. So getting connections from a Connection Pool is one of the places where there can be a wait state. Clients waiting for connections to return to the pool, or new connections to be made. So you need a profile tool to tell you based on load how many connections are being used, how many clients are waiting, and to adjust your settings accordingly and see how it affects your performance.

          So what this means is that you have to test your own system and find the best numbers for your application. Now, there are some general guidlines for sizes of applications and databases, but those are just general, and I don't have those memorized.

          • 2. Re: JNDI datasource connection pooling
            lorenz fischer Newbie

            thanks Mark

            if i find a good tool for that manner i'll post it here again.

            so long
            lorenz