

The ideal number varies depending on the application and the system hardware. Oracle recommends 1-10 connections per CPU core. So, for creating a static connection pool, the number of connections to the database system must be based on the CPU cores available on the system.

Creating a new connection to the database is a resource intensive activity, and when lots of connections are made in a short period of time, it can overwhelm the CPU resources on the database system. If there are not enough connections to the database to serve all of the requests, then the application server opens new connections. A connection storm can occur when there are lots of activities on the application server requiring database connections. In the real world, this configuration enables connection storms and database system CPU oversubscription, quickly destabilizing a system.

This configuration conserves system resources by only maintaining the number of connections actively needed by the application. If a connection has not been used for a specified duration of time, then the application closes the connection, if there are more than the minimum number of connections available. If there are no connections available, then the application creates a new connection, if it has not reached the maximum number of connections already. When an application needs a connection to the database, then it requests one from the pool. Most applications use a dynamic pool of connections to the database, configured with a minimum number of connections to keep open on the database and a maximum number of connections that can be made to the database. For this reason, designing a sound connection strategy is crucial for system performance, especially in enterprise environments that must scale to meet increasing demand. Most on-line transaction processing (OLTP) performance problems that the Real-World Performance group investigates relate to the connection strategy used by the application.
