Dynamically changing the checkpoint frequency

You can use the LOGLOAD option, the CHKTIME option, or a combination of both of these options of the SET LOG command to dynamically change the checkpoint frequency without recycling Db2.

About this task

Begin general-use programming interface information.The LOGLOAD value specifies the number of log records that Db2 writes between checkpoints. The CHKTIME value specifies the number of minutes between checkpoints.

You specify the initial LOGLOAD and CHKTIME parameter values at installation time. Also at installation time, you specify which of these values controls when a checkpoint occurs, or whether both do. If you specify both the LOGLOAD and CHKTIME options together, when the threshold for one is reached, a system checkpoint is taken, and the counters for both thresholds are reset. In the following example, the SET LOG command changes checkpoint scheduling to use both log records and time:
-SET LOG BOTH CHKTIME(10) LOGLOAD(500000)

Either value affects the restart time for Db2. For example, during prime shift, your Db2 shop might have a low logging rate but require that Db2 restart quickly if it terminates abnormally. To meet this restart requirement, you can decrease the LOGLOAD value to force a higher checkpoint frequency. In addition, during off-shift hours, the logging rate might increase as batch updates are processed, but the restart time for Db2 might not be as critical. In that case, you can increase the LOGLOAD value which lowers the checkpoint frequency.

You also can use either the LOGLOAD option or the CHKTIME option to initiate an immediate system checkpoint. For example:
-SET LOG LOGLOAD(0)
-SET LOG CHKTIME(0)

The CHKFREQ value that is altered by the SET LOG command persists only while Db2 is active. On restart, Db2 uses the CHKFREQ value in the Db2 subsystem parameter load module. End general-use programming interface information.