Minimum pool size, Maximum pool size, Checkouttimeout – HP Integrity NonStop J-Series User Manual

Page 73: Maxidletime, Module file caching configurations, Configuring nonstop sql/mx datasource for mfc

Advertising
background image

Minimum Pool Size

The correct minimum value for the pool can be determined by examining the applications that are
using the pool. If it is determined, for example, that at least four connections are needed at any
point in time, the minimum number of connections should be set to 4 to ensure that all requests
can be fulfilled without connection wait timeout exceptions. At off-peak times, the pool shrinks back
to this minimum number of connections. A good rule of thumb is to keep this number as small as
possible to avoid holding connections unnecessarily open.

Maximum Pool Size

The best practice is to ensure that only one connection is required on a thread at any time. This
avoids possible deadlocks when the pool is at maximum capacity and no connections are left to
fulfill a connection request. Therefore, with one connection per thread, the maximum pool size can
be set to the maximum number of threads.

When using servlets, this can be determined by looking at the MaxConnections property in the
Servlet Engine. If multiple connections are required on a thread, the maximum pool size value can
be determined using the following formula:

T *(C -1) + 1

Where T is the number of threads, and C is the number of connections.

checkoutTimeout

It is important to know roughly how long the average application will use a connection in the pool.
For example, if all applications using a connection pool are known to only hold a connection for
an average time of 5 seconds, with a maximum of 10 seconds, it may be useful to have a Timeout
value of 10 or 15 seconds.

maxIdleTime

This is a very useful parameter if you are using a resource strapped machine. If you have set your
maximum and minimum connection pool sizes properly, you may want to lower the Idle Timeout
so that when usage of the pool is low, there are no connections sitting open that are not doing
anything. Be very careful in how low to set this parameter because setting it to low will introduce
the cost of creating connections to more applications when a transformation from light load to
heavy load begins.

Module File Caching Configurations

The Module File Caching (MFC) feature shares the prepared statement plans among the NonStop
SQL/MX database connections and helps in reducing resource consumption. MFC is disabled by
default; therefore, it must be configured to enable it.

To use the MFC feature, you must perform the following activities:

“Configuring NonStop SQL/MX DataSource for MFC” (page 73)

“Modifying the Spring Application” (page 74)

NOTE:

JDBC Type 4 driver offers MFC feature.

Configuring NonStop SQL/MX DataSource for MFC

To configure MFC on a NonStop system, complete the following steps:

1.

Enter the SQL/MX Connectivity Service (MXCS) subsystem using the SQL/MX Conversational
Interface (MXCI) subsystem:

mxci>> mode mxcs;

2.

Configure a datasource for the user specified association service (MXOAS service):

mxci>> add ds $mcbs."MFC_datasource";

Module File Caching Configurations

73

Advertising
This manual is related to the following products: