JDBC Type 4 Driver Programmer's Reference for SQL/MX Release 3.1 (H06.23+, J06.12+)

Chapter 7. Module File Caching (MFC)
Prev Next
Chapter 7. Module File Caching (MFC)
MFC Overview
Design of MFC
Configuring MFC
Enabling MFC
MFC Usage Scenarios
MFC Tuning Recommendations
MFC Limitations
Statement Caching
MFC Overview
The applications, which use JDBC T4 driver, face repeated SQL compiles while using prepared statements. To overcome this issue, a
driver side Most Frequently Used (MFU) cache is used. However, the current design of the driver side cache consumes large amount of
memory. The size of the MXOSRVR process memory is directly proportional to the size of the driver side cache configured through the
maxStatements property. Higher maxStatements value (driver side cache size) can breach the MXOSRVR process memory limit of 2
GB on the NonStop platform.
The Module File Caching (MFC) feature shares the prepared statement plans among the NonStop SQL/MX database connections. The
MFC helps in reducing the SQL compilation time during JDBC or ODBC application's steady state, thereby reducing resource
consumption.
Note: Module File Caching is supported only on systems running J06.07 and later J-series RVUs and H06.18 and later H-
series RVUs.
MFC Design
For information on the MFC design, see the HP NonStop SQL/MX Connectivity Service Manual.
Configuring MFC
For information on configuring MFC, see the HP NonStop SQL/MX Connectivity Service Manual.
Enabling MFC
The following property is required to use MFC in an application that uses the JDBC Type 4 driver:
enableMFC
To enable MFC, the value of this property must be set to ON. For example: -Dt4sqlmx.enableMFC = ON.
In the JDBC Type 4 driver, MFC is enabled by default.
MFC Usage Scenarios
The benefits of lower processor and memory utilization mentioned below are applicable on the NonStop Server.
JDBC T4 applications using java.sql.Connection.prepareStatement() have the benefit of lower processor utilization, lower memory
consumption, and better response time.
JDBC T4 applications using complex queries through prepare calls, have higher benefit of lower processor utilization, lower memory
consumption, and better response time. For example, Hibernate generated queries.
JDBC T4 applications with higher driver side cache size can benefit from lower memory utilization by using the combination of MFC and
driver side MFU cache.
For example, an application with t4sqlmx.maxStatements=1000 can benefit by changing to t4sqlmx.maxStatements=600 and MFC.
In this example, all statements are cached in MFC and the most frequently used statements are cached in the driver side MFU cache.
JDBC T4 applications, which have large number of statements that are SQL compiled at the startup, can benefit from reduced (re-) startup
time by using the MFC feature. In situations, where servers are configured for automatic restart, the startup time is reduced.