Databases Reference
In-Depth Information
your application, not the number at the busiest time of day or the number at
the slowest time of day. For example, suppose you have an application that
consistently has about 15 users. You would want to set the maximum num-
ber of connections for the pool to 15 so that the pool isn't maintaining more
connections than are needed for typical application usage. Remember, more
connections means more database memory and CPU usage.
Also, you can use the maximum pool size attribute to limit the number of
database server licenses that your applications use.
To determine the optimal setting for the minimum number of connections
for a pool, calculate the number of concurrent connections used by your
application at the slowest time of day. Use this number for the minimum
number of connections for your pool. In ADO.NET, the minimum pool size
is also the initial pool size, so you should consider the following information
about initial pool size when making your decision about this setting.
To determine the optimal setting for the initial pool size, think about the
usage of your application. If your application starts at the beginning of the
business day, which is the slowest time of day, you may want to consider ini-
tializing your pool with the minimum number of connections allowed in
your pool. If, on the other hand, your application runs 24 hours a day and is
only restarted when absolutely necessary, you may want to consider initializ-
ing your pool with the typical number of concurrent connections that your
application uses.
To determine the optimal setting for the maximum idle time (load balance
timeout), think about the slowest time of day for your applications and set
this option accordingly. For example, if in the evening you know that only
one or two users are logging into applications every hour or so, you would
want to configure this setting to at least 60 minutes. That way, a connection
will be waiting in the pool for your users; a connection will not have to be
reestablished, which we know is performance expensive.
Using Reauthentication with Connection Pooling
To minimize the number of connections required in a connection pool, the user
associated with a connection can be switched to another user, a process known as
reauthentication . 2 For example, suppose using the same set of login credentials
2 Different databases refer to this functionality using different terminology. For example, Oracle uses
proxy authentication and Microsoft SQL Server uses impersonation .
 
Search WWH ::




Custom Search