Abstract
Distributed databases rely on Paxos-based replication to ensure strong consistency, but the overhead of synchronizing metadata like commit points often limits performance. This paper presents a "piggybacking" technique implemented in OceanBase that embeds commit points directly into transactional log headers. By reducing separate I/O and network operations for metadata, the proposed method achieves a 1.3× throughput improvement in update-intensive workloads without compromising consistency.
Introduction
In modern distributed systems, the Paxos protocol is essential for maintaining data consistency across nodes. It functions by replicating transactional logs from a primary Leader to multiple Followers. A critical component of this process is tracking the "commit point"—the Log Sequence Number (LSN) that has been successfully persisted by a majority of nodes.
Traditionally, the commit point is synchronized as a separate administrative task. This approach introduces significant overhead through additional disk fsync() calls and extra network messages. In high-concurrency environments, such as major e-commerce events, these costs become a bottleneck. This paper addresses these inefficiencies by integrating metadata synchronization directly into the data stream.
Methodology: Piggybacking and Adaptive Grouping
The core innovation is the "piggybacking" of metadata. Instead of treating the commit point as a separate message, the Leader embeds the current committed_LSN into the header of the next transactional log entry.
As shown in the figure above, each log entry (e.g., LSN 101) contains not just the transaction data, but also the CommittedLSN (e.g., 99). This allows Followers to learn about the latest commit point without requiring dedicated control messages.
To determine the committed_LSN, the Leader tracks the FlushedLSN reported by all members. The commit point is defined as the highest LSN that has been flushed by a majority of the Paxos group.
In addition to piggybacking, the authors implemented an Adaptive Group Commit mechanism. This system groups multiple log records into a single unit based on an adaptive commit_interval. This interval self-adjusts according to the actual persistence time on replica nodes, optimizing I/O efficiency across varying hardware and network conditions.
Evaluation and Results
The protocol was evaluated using the Yahoo! Cloud Serving Benchmark (YCSB) on a cluster of 18 machines. The researchers focused on a "heavy replace" workload (100% writes) with 10 million records to simulate extreme update-intensive scenarios.
The results compared the piggybacking method (PIGGY) against standard synchronous (SYNC) and background asynchronous (ASYNC) methods:
- Throughput: PIGGY achieved 1.3× higher throughput than the SYNC method at high concurrency (1,400 clients).
- I/O Efficiency: PIGGY recorded the lowest number of disk write requests per second, confirming that embedding metadata effectively reduced the I/O burden.
- Network Utilization: PIGGY maintained low message counts similar to SYNC while providing the performance benefits typically associated with more complex asynchronous methods.
Conclusion
By treating control metadata as a "passenger" on the existing log stream, the proposed low-overhead replication protocol significantly enhances the performance of Paxos-based systems. While the gains are most prominent in write-heavy workloads, future work could explore optimizations for read-heavy scenarios and the integration of emerging hardware like Non-Volatile Memory (NVM) to further reduce latency.
Summary updated