Parameters related to memory | Parameters related to disk I/O


DB2 Parameters related to transaction logs


+

Search Tips   |   Advanced Search

When considering values for the transaction log file size (LOGFILSZ) and the number of primary (LOGPRIMARY) and secondary (LOGSECOND) logs, some generalizations for OLTP applications can be applied. A high number of short transactions are typical in OLTP systems. Hence, the size of the log file should be relatively large. Otherwise, more processing time will be spent managing log files and writing to the transaction logs.

A good starting point for the size of the log file in WebSphere Commerce implementations is to set the value to 10000.

Primary log files are allocated when the database is activated, or on the first connect. If a long-running transaction fills up all the primary logs, then secondary logs will be allocated as needed until the LOGSECOND limit is reached. The allocation of a secondary log file is a significant performance hit, and should be minimized if it cannot be avoided.

To determine the correct settings for these parameters, you need to monitor the database and see whether secondary log files are being allocated. If they are, then you need to increase the number of primary log files. You can monitor this by taking a database snapshot and looking for the following two lines:

Maximum secondary log space used (Bytes) = 0
Secondary logs allocated currently = 0

A good starting point for the number of primary log files (LOGPRIMARY) is anywhere from 6 to 10.