The Commit Bottleneck
To commit durably, a transaction must force its log records to stable storage with a flush. That flush is slow because it waits for the disk to confirm the write. If every transaction flushed alone, throughput would be limited by how many flushes per second the disk can do.
Batching Commits
Group commit solves this by letting many transactions share one flush. While a flush is in progress, arriving commits queue up. When the flush finishes, the engine issues one new flush covering all queued log records at once, and every waiting transaction is acknowledged together.
- A single disk flush satisfies the durability of many transactions.
- Throughput rises sharply under concurrent load because flush cost is amortized.
- Each transaction still waits for a real flush, so durability is preserved.
The Tradeoff
An individual transaction may wait a little longer to join a batch, adding latency, but total commits per second climbs. The technique only helps when many transactions commit concurrently.
Key idea
Group commit batches the log flushes of many concurrent transactions into one disk write, amortizing flush cost to raise throughput while keeping each commit durable.