Visible to the public Adaptive Logging: Optimizing Logging and Recovery Costs in Distributed In-memory Databases

TitleAdaptive Logging: Optimizing Logging and Recovery Costs in Distributed In-memory Databases
Publication TypeConference Paper
Year of Publication2016
AuthorsYao, Chang, Agrawal, Divyakant, Chen, Gang, Ooi, Beng Chin, Wu, Sai
Conference NameProceedings of the 2016 International Conference on Management of Data
PublisherACM
Conference LocationNew York, NY, USA
ISBN Number978-1-4503-3531-7
Keywordsaries logging, command logging, distributed in-memory database, OLTP, pubcrawl, Resiliency, System recovery, transaction logging
Abstract

By maintaining the data in main memory, in-memory databases dramatically reduce the I/O cost of transaction processing. However, for recovery purposes, in-memory systems still need to flush the log to disk, which incurs a substantial number of I/Os. Recently, command logging has been proposed to replace the traditional data log (e.g., ARIES logging) in in-memory databases. Instead of recording how the tuples are updated, command logging only tracks the transactions that are being executed, thereby effectively reducing the size of the log and improving the performance. However, when a failure occurs, all the transactions in the log after the last checkpoint must be redone sequentially and this significantly increases the cost of recovery. In this paper, we first extend the command logging technique to a distributed system, where all the nodes can perform their recovery in parallel. We show that in a distributed system, the only bottleneck of recovery caused by command logging is the synchronization process that attempts to resolve the data dependency among the transactions. We then propose an adaptive logging approach by combining data logging and command logging. The percentage of data logging versus command logging becomes a tuning knob between the performance of transaction processing and recovery to meet different OLTP requirements, and a model is proposed to guide such tuning. Our experimental study compares the performance of our proposed adaptive logging, ARIES-style data logging and command logging on top of H-Store. The results show that adaptive logging can achieve a 10x boost for recovery and a transaction throughput that is comparable to that of command logging.

URLhttp://doi.acm.org/10.1145/2882903.2915208
DOI10.1145/2882903.2915208
Citation Keyyao_adaptive_2016