We present the architectural design and recent performance optimizations of a state of the art commercial database replication technology provided in Oracle Streams. The underlying design of Streams replication is a pipeline of components that are responsible for capturing, propagating, and applying logical change records (LCRs) from a source database to a destination database. Each LCR encapsulates a database change. The communication in this pipeline is now latch-free to increase the throughput of LCRs. In addition, the apply component now bypasses SQL whenever possible and uses a new latch-free metadata cache. We outline the algorithms behind these optimizations and quantify the replication performance improvement from each optimization. Finally, we demonstrate that these optimizations improve the replication performance by more than a factor of four and achieve replication throughput of over 20,000 LCRs per second with sub-second latency on commodity hardware.
Lik Wong, Nimar S. Arora, Lei Gao, Thuvan Hoang, J