Alex Rivera | Logout

Optimal number of connections in connection pool

Asked 2009-07-30T17:25:01.243
52

Currently we are using 4 cpu windows box with 8gb RAM with MySQL 5.x installed on same box. We are using Weblogic application server for our application. We are targeting for 200 concurrent users for our application (Obviously not for same module/screen). So what is optimal number of connections should we configured in connection pool (min and max number) (We are using weblogic AS' connection pooling mechanism) ?

Edit
Report

2 Answers

3

The connection pool should be able to grow and shink based on actual needs. Log the numbers needed to do analysis on the running system, either through logging statements or through JMX surveillance. Consider setting up alerts for scenarios like "peak detected: more than X new entries had to be allocated in Y seconds", "connection was out of pool for more than X seconds" which will allow you to give attention to performance issues before they get real problems.

answered 2009-07-30T17:42:29.867
2

It's difficult to get hard data for this. It's also dependent on a number of factors you don't mention -

  • 200 concurrent users, but how much of their activity will generate database queries? 10 queries per page load? 1 query just on login? etc. etc.

  • Size of the queries and the db obviously. Some queries run in milliseconds, some in minutes.

You can monitor mysql to watch the current active queries with "show processlist". This could give you a better sense of how much activity is actually going on in the db under peak load.

answered 2009-07-30T17:33:18.980

Your Answer