Information Technology Reference
In-Depth Information
Chapter 15
Processing of Write-Intensive Transactions
Many traditional transaction-processing applications such as banking and stock
trading are write intensive in nature: they involve a great number of concurrent, rel-
atively short updating transactions that have stringent response-time requirements,
besides strict consistency requirements. The shift from reads to writes in modern
web applications has also been observed in recent years. This trend poses challenges
to the performance of a traditional transaction-processing system based on write-
ahead logging and random writes of B-tree pages.
With the traditional commit protocol for transactions doing write-ahead logging,
when a large number of transactions want to commit at about the same time, it takes
as many rotational delays as there are committing transactions until the last of these
succeeds to commit, because the log is forced to disk after each append of a commit
log record to the log buffer. When waiting for being committed, these transactions
hold their commit-duration locks. To alleviate this logging bottleneck, a commit
protocol called group commit can be applied with which a group of transactions
requesting to be committed can release their locks and be committed by a single
force write of the log containing all the commit log records for the group.
The fact that sequential disk accesses are much faster than random ones offers
opportunities to important optimizations. In a write-optimized B-tree , a set of pages
randomly updated in the buffer are flushed onto new contiguous locations on disk
using a single large sequential disk write. A merge tree consists of a small main-
memory B-tree (or some other kind of a balanced tree structure) that receives the
updates from transactions and of a series of one or more disk-based B-trees of
growing size each receiving updates through occasional merges with a smaller tree.
The separation of the log file that records the update actions and the data pages
that contain the current data still incurs write overheads observed in write-intensive
environments. This has given rise to recent proposals of log-structured databases ,
in which the log serves as the unique data repository in the system.
These new access structures designed for write-intensive transaction processing
are used in several key-value stores acting as database servers for popular Internet
Search WWH ::




Custom Search