[jboss-user] [Performance Tuning] - Configuration of Datasource: min-pool-size and max-pool-size

Peter Johnson do-not-reply at jboss.com
Mon Aug 2 11:19:01 EDT 2010


Peter Johnson [http://community.jboss.org/people/peterj] replied to the discussion

"Configuration of Datasource: min-pool-size and max-pool-size"

To view the discussion, visit: http://community.jboss.org/message/555457#555457

--------------------------------------------------------------
What percentage of the requests made by a user require a database connection?
How many database connections does a typical request require?
Typically, how many simultaneous requests are made?

Once you answer those questions, then you will know how many connections to provide. For example, if only 50% of the requests require a single connection, and usually there are only 5 requests being simultaneously processed, then 3 connections is sufficient.

Another way to do this is to test it. Run with max connectiosn set to a large number of connections,say 100, and min connections set low, say 2 connections. Then monitor the number of active connections over the course of a day. That should tell you how many you need.

You should also monitor the number of queued connection requests. Let's say you used the first example and set max connections to 3. Yet you notive that quite often you have as many as 4 queued connection reqeusts, then you should increase the max connections to 7.

Another thing to consider is that you can always set max connection to a high number, say 100, and set min connections to your typical usage, say 7 to keep with the prior example. You will only ever have more than 7 connections if you actually need them.

--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/555457#555457]

Start a new discussion in Performance Tuning at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2078]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100802/6e098589/attachment.html 


More information about the jboss-user mailing list