Group Commit and Flush Batching

Share an expensive log flush across several transactions while acknowledging each only after its required position is durable.

Source
Anbloq
Language
English
Created
Updated
Chapters
2
Reading time
1 min
In this article2 chapters
  1. One flush can cover an entire log prefix
  2. Batching trades latency against amortized work

One flush can cover an entire log prefix

If transactions need durable log through positions \(80,95,101\), a flush through \(101\) can satisfy all three once the corresponding records have been safely appended. A log flusher can accumulate requests and wake transactions whose required position is now covered. This reduces flushes per transaction under concurrent demand. It depends on the device and filesystem honoring the flush semantics.

Batching trades latency against amortized work

Waiting a little longer can collect more transactions, but a lightly loaded system may make each transaction wait for a batch with little benefit. Use the observed queue and active durability requirements in the design. Write-ahead logging describes why data pages need not all be flushed at acknowledgment. Amortized latency explains why low average cost and fast individual completion are separate criteria.[1][2]

References

  1. C. Mohan et al., ARIES: A Transaction Recovery Method ↩
  2. CMU 15-445/645, Introduction to Database Systems: Lectures ↩