Limiting the Number of Connections to the Oracle Database
You can optimize performance while ensuring a limit to the number of connections to the Oracle database.
Tuning the total number of connections depends on the following:
Note:
These calculations assume that all connections to the Oracle database are client/server connections using a multithreaded server. The connections referred to in the rest of this section are only those used for dynamic load operations. There can be other connections from TimesTen to the Oracle database that are not accounted for in these calculations.-
N: The number of connections to the Oracle database.
-
P: The limit on the number of connections for each cache connection pool, where each TimesTen child server process has a cache connection pool. You can set this with the
MaxSize
cache connection pool parameter using thettCacheConnPoolSet
built-in procedure. -
S: The maximum number of child server processes that can be spawned for new connections. Currently, there is no direct way to limit the number of child server processes. Indirectly, you can influence the number of child server processes by setting the
MaxConnsPerServer
andConnections
connection attributes. You should measure S on your system when your system is in a steady state that represents the typical operating conditions. -
M: The maximum number of connections for each child server process, which you can set with the
MaxConnsPerServer
connection attribute. -
D: The maximum number of connections to a DSN, which is set with the
Connections
connection attribute.
The number of connections (N) to the Oracle database is equal to the maximum number of TimesTen child server processes (S) times the maximum number of connections for each cache connection pool (P).
N=S*P
The maximum number of connections (D) to the DSN is equal to the maximum number of connections for each child server process (M) times the maximum number of TimesTen child server processes (S).
D=M*S
With the above calculation, you can also state:
S=D/M
Since there is no hard limit that we can configure for the number of TimesTen child server processes, we substitute for S to get the following equation:
N=(D*P)/M
Assuming that all connections to the Oracle database are client/server connections,
then the maximum number of connections to the Oracle database
arising from cache connection pools is equal to the maximum
number of connections to the DSN (set by the
Connections
connection attribute)
times the number of connections for each cache connection pool
(set by the MaxSize
cache connection pool
parameter), which is then divided by the maximum number of
connections for each child server process (set by the
MaxConnsPerServer
connection
attribute).
Note:
For TimesTen Scaleout, you may also want to limit the connections to the Oracle database through limiting the number of cache agents. See Limiting Cache Agent Connections to the Oracle Database in the Oracle TimesTen In-Memory Database Scaleout User's Guide.