Databases Reference
In-Depth Information
The number of connection pools that an application uses depends on the
number of unique connection strings that application uses. The more pools that
an application maintains, the more memory usage on both the client machine
and the database server.
You can define the following attributes of a connection pool, which help you
configure a pool for optimal performance
:
•
Maximum pool size
is the maximum number of connections allowed in a
pool, both active and idle.
Active connections
are the connections that are
currently in use by the application, and
idle connections
are the connections
that are available for use in the pool.
•
Minimum pool size
is the number of connections created when a connec-
tion pool is initialized and the minimum number of active and idle connec-
tions that will be kept in the pool. A connection pool is created when the first
connection with a unique connection string connects to the database. The
connection pool retains this number of connections, even when some con-
nections exceed their load balance timeout value.
•
Load balance timeout
is the amount of time idle connections remain in the
pool before being destroyed.
Performance Tip
The goal is to maintain a reasonable connection pool size while ensuring
that each user who needs a connection has one available within an
acceptable response time. To achieve this goal, you can configure the
minimum and maximum number of connections that are in the pool at
any given time and how long idle connections stay in the pool, as we dis-
cuss next.
Here are some guidelines for setting connection pool attributes:
•
To determine the optimal setting for the maximum number of connections
for a pool, plan for the typical number of concurrent connections used by