Search code examples
javamysqlperformanceweblogicconnection-pooling

Optimal number of connections in connection pool


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) ?


Solution

  • There is a very simple answer to this question:

    The number of connections in the connection pool should be equal the number of the exec threads configured in WebLogic.

    The rationale is very simple: If the number of the connections is less than the number of threads, some of the thread maybe waiting for a connection thus making the connection pool a bottleneck. So, it should be equal at least the number the exec threads (thread pool size).