Product Documentation

Database Administrator's Guide

Previous Topic

Next Topic

Controls for Performance AND Safety of Non-Transaction Updates

(In this discussion, a cache page that has been updated and has not yet been written to the file system is called a "dirty page.")

FairCom DB offers multiple levels of transaction protection for your data. Some applications do not require the recoverability full transaction provides for performance reasons. However, these applications may be vulnerable to data loss should system failure occur. If FairCom Server terminates abnormally, updates to data and index files that are not under full transaction control are lost if those updates have not yet been written from c-tree's in-memory data and index caches to the file system. The following factors typically reduce the number of dirty pages that exist:

  1. When an updated cache page is being reused, the updated page is written to the file system cache.
  2. When all connections close a c-tree file, FairCom Server writes the updated pages to the file system cache before closing the file.
  3. An internal thread periodically checks if FairCom Server is idle, and if so it writes updated pages to the file system cache.

However, the combination of using very large data and index caches, keeping files open for long periods of time, and having constant activity on the system increases likelihood that more dirty cache pages exist.

It is possible to define a vulnerability window limiting potential loss of updates for your non-transaction data and index files. FairCom Server supports options to write dirty cache pages to the file system within a specified time period. This means that no more than a set amount of time can pass where data is not flushed to disk.

The following FairCom Server configuration options set the time limit (in seconds) that a data cache page or index buffer can remain dirty before it is written to the file system cache. The default time limit is IMMEDIATE (flush updates for non-tran files to the file system as soon as possible). Specify a value to set a time limit in seconds. Specify OFF to disable time limit-based flushing.

NONTRAN_DATA_FLUSH_SEC <time_limit_in_seconds>

NONTRAN_INDEX_FLUSH_SEC <time_limit_in_seconds>

These options can also be changed using the ctSETCFG() API function and using the ctadmn utility.

Monitoring Non-Transaction Data Flush

Fields have been added to the system snapshot structure (ctGSMS) to hold the non-tran flush settings and statistics. See Time limit on flushing updated data and index cache pages for TRNLOG files in the FairCom DB Programmer's Reference.

Tuning Non-Transaction Data Flush

These FairCom Server configuration options set the number of counter buckets for the dirty data page and index buffer lists:

NONTRAN_DATA_FLUSH_BUCKETS <number_of_buckets>


The default number of counter buckets is 10. Setting the option to zero disables the use of the counter buckets.

Non-Transaction Flush Diagnostics

The configuration option DIAGNOSTICS BACKGROUND_FLUSH can be used to enable logging of flush thread operations to the file NTFLS.FCS.

The configuration option DIAGNOSTICS BACKGROUND_FLUSH_BUCKETS can be used to enable logging of flush counter bucket statistics to the file NTFLSBKT.FCS. Each time a text snapshot is written to the file SNAPSHOT.FCS file, the bucket statistics are written to the NTFLSBKT.FCS file.