Documentation

Knowledgebase

Previous Topic

Next Topic

Delayed Durability

c-treeACE offers a mode of transaction processing that allows you to fine-tune the balance between performance and recoverability. Many applications can benefit significantly from relaxing recoverability and still maintain an acceptable data risk tolerance.

Delayed Durability Transaction Processing

With full transaction control for complete ACID compliance, transaction logs are synced to disk with each commit operation, ensuring absolute data integrity with complete recoverability. Full durable ACID transaction control enables many powerful features not available without the availability of recoverable log data:

  • Automatic database recovery
  • Live database backups without rebuild on restore
  • Replication
  • Transaction auditing

The most critical of these is automatic recovery in case of system failure. However, full transaction control remains a critical area of database performance tuning. Database updates must be secured in write-ahead logs for guaranteed recoverability. This comes with a performance impact due to the synchronous I/O requirements ensuring data is safely persisted.

Many applications could benefit from a "relaxed" mode of transaction log writes. With today's hardware and power redundancies, it is conceivable to slightly relax full durability constraints and still maintain an acceptable data risk tolerance. The balance becomes "how much loss of recoverability can these systems tolerate?"

Allowing database administrators to balance their window of vulnerability against online performance, c-treeACE provides a new Delayed Durability feature for transaction logs.

Full Recoverability

Preimage (Atomicity Only)

Non-Transaction Mode

This new transaction operation mode allows its c-treeACE transaction log updates to remain cached in its in-memory transaction log buffer as well as in file system cache, even after a transaction has committed. The challenge is to avoid index and disk updates from reaching disk before the transaction entries do. FairCom has managed to delay transaction log writes to persisted storage while guaranteeing these transaction log entries for a given transaction write to disk before any data file updates associated with that transaction are written to file system cache or to persistent storage with a modified log sync strategy. In addition, a background thread guarantees an upper bound on the total amount of time any transaction remains in a non-synced state.

This feature is enabled with the following configuration entry and takes as an argument the maximum number seconds, N, that will elapse between log syncs. This ensures that, after a commit, the transaction log will be synced in no more than N seconds, thereby allowing you to define your window of vulnerability risk.

DELAYED_DURABILITY <N>

The end result can approach non-transaction performance while ensuring committed transactions to persisted storage to within less than N seconds of vulnerability. Values as low as one (1) second are shown to provide the best performance. In selected test cases, up to 300% faster transaction throughput has been observed. Higher values have been found to offer little, if any, additional benefit.

For complete information about this mode, see the section titled Delayed Durability Transaction Processing in the the c-treeACE Programmers Reference Guide.

TOCIndex