Product Documentation

Database Administrator's Guide

Previous Topic

Next Topic

Efficient Transaction Log Template Copies

The log template feature is a fast and efficient means of creating transaction logs in high volume systems. An initial transaction log template is created and copied when a new transaction log is required.

The original implementation used an operating system file copy command (for example., cp L0000002.FCT L0000002.FCS) to initiate the copy of the template to the newly named file. This approach required the full contents of the template file to be read. For systems experiencing high volume transaction loads where a template is frequently copied, this method placed unnecessary demand on system resources.

An improved efficient method for copying transaction log template file is available.

Template Copy Options

The following configuration options can be used to modify the speed of copying a log template such that log template disk write performance impact is reduced.

Copy Sleep Time

LOG_TEMPLATE_COPY_SLEEP_TIME <milliseconds>

This keyword results in the copying of the log template to be paused for the specified number of milliseconds each time it has written the percentage of data specified by the LOG_TEMPLATE_COPY_SLEEP_PCT option to the target transaction log file.

  • Default value: 0 (disabled)
  • Minimum value: 1
  • Maximum value: 1000 (1 second sleep)

Copy Sleep Percentage

LOG_TEMPLATE_COPY_SLEEP_PCT <percent>

This keyword specifies the percentage of data that is written to the target transaction log file after which the copy operation sleeps for the number of milliseconds specified for the LOG_TEMPLATE_COPY_SLEEP_TIME option.

  • Default value: 15
  • Minimum value: 1
  • Maximum value: 99

Example

The following example demonstrates the options that cause the copying of the log template file to sleep for 5 milliseconds after every 20% of the transaction log template file has been copied:

LOG_TEMPLATE_COPY_SLEEP_TIME 5

LOG_TEMPLATE_COPY_SLEEP_PCT 20

Note: If an error occurs using this method an error message is output to CTSTATUS.FCS (identified with the "LOG_TEMPLATE_COPY: ..." prefix) and FairCom DB then attempts the log template system copy method.

TOCIndex