Efficient Single Writer Concurrency

03/23/2018
by   Naama Ben-David, et al.
0

In this paper we consider single writer multiple reader concurrency - any number of transactions can atomically access shared data structures, but only one thread can atomically update the data. Limiting ourselves to a single writer allows us to achieve strong properties, some of which are not achievable with multiple writers. In particular, we guarantee strict serializability, no aborts, wait-freedom with strong bounds on step complexity, and precise garbage collection. Our approach is based on a variant of multiversion concurrency control. The user code accesses shared data in a purely functional manner. This allows each read to get a snapshot of the current database. The writer simply swaps in a new root to commit a new version. For garbage collection, we define the version maintenance problem and present efficient algorithms that solve it. This framework allows for very low overhead for maintaining and collecting multiple versions. The single-writer setup is particularly applicable to search indices, online graph analysis, and hybrid transactional/analytical processing (HTAP) databases, in which the bulk of the work is done by transactions that analyze the data. We have implemented the approach in C++ based on a parallel library PAM on balanced binary trees. We present results for two use cases: concurrent range-sum queries and a search index on a corpus. Both support adding new elements to the database. Experiments show that in both cases there is very little overhead when adding a single writer running in the background, while the queries can gradually get newly updated versions. Also, using our lock-free algorithm for version maintenance, the maximum live versions is bounded by the number of working transactions at the same time.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
12/27/2022

Practically and Theoretically Efficient Garbage Collection for Multiversioning

Multiversioning is widely used in databases, transactional memory, and c...
research
10/31/2022

EEMARQ: Efficient Lock-Free Range Queries with Memory Reclamation

Multi-Version Concurrency Control (MVCC) is a common mechanism for achie...
research
10/17/2019

MV-PBT: Multi-Version Index for Large Datasets and HTAP Workloads

Modern mixed (HTAP) workloads execute fast update-transactions and long-...
research
04/07/2019

Obtaining Progress Guarantee and GreaterConcurrency in Multi-Version Object Semantics

Software Transactional Memory Systems (STMs) provides ease of multithrea...
research
08/05/2021

Space and Time Bounded Multiversion Garbage Collection

We present a general technique for garbage collecting old versions for m...
research
01/20/2022

Serializable HTAP with Abort-/Wait-free Snapshot Read

Concurrency Control (CC) ensuring consistency of updated data is an esse...
research
06/29/2020

Transactions on Red-black and AVL trees in NVRAM

Byte-addressable non-volatile memory (NVRAM) supports persistent storage...

Please sign up or login with your details

Forgot password? Click here to reset