Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/penberg/tihku
Optimistic multi-version concurrency control (MVCC) for main memory databases, written in Rust.
https://github.com/penberg/tihku
database mvcc rust
Last synced: 17 days ago
JSON representation
Optimistic multi-version concurrency control (MVCC) for main memory databases, written in Rust.
- Host: GitHub
- URL: https://github.com/penberg/tihku
- Owner: penberg
- License: mit
- Created: 2023-04-06T06:47:49.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-07-12T08:11:08.000Z (over 1 year ago)
- Last Synced: 2024-10-13T15:41:28.401Z (about 1 month ago)
- Topics: database, mvcc, rust
- Language: Rust
- Homepage:
- Size: 436 KB
- Stars: 109
- Watchers: 6
- Forks: 10
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Tihku
Tihku is an _work-in-progress_, open-source implementation of the Hekaton multi-version concurrency control (MVCC) written in Rust.
The project aims to provide a foundational building block for implementing database management systems.One of the projects using Tihku is an experimental [libSQL branch with MVCC](https://github.com/penberg/libsql/tree/mvcc) that aims to implement `BEGIN CONCURRENT` with Tihku improve SQLite write concurrency.
## Features
* Main memory architecture, rows are accessed via an index
* Optimistic multi-version concurrency control
* Rust and C APIs## Experimental Evaluation
**Single-threaded micro-benchmarks**
Operations | Throughput
-----------------------------------|------------
`begin_tx`, `read`, and `commit` | 2.2M ops/second
`begin_tx`, `update`, and `commit` | 2.2M ops/second
`read` | 12.9M ops/second
`update` | 6.2M ops/second(The `cargo bench` was run on a AMD Ryzen 9 3900XT 2.2 GHz CPU.)
## Development
Run tests:
```console
cargo test
```Test coverage report:
```console
cargo tarpaulin -o html
```Run benchmarks:
```console
cargo bench
```Run benchmarks and generate flamegraphs:
```console
echo -1 | sudo tee /proc/sys/kernel/perf_event_paranoid
cargo bench --bench my_benchmark -- --profile-time=5
```## References
Larson et al. [High-Performance Concurrency Control Mechanisms for Main-Memory Databases](https://vldb.org/pvldb/vol5/p298_per-akelarson_vldb2012.pdf). VLDB '11
Paper errata: The visibility check in Table 2 is wrong and causes uncommitted delete to become visible to transactions (fixed in [commit 6ca3773]( https://github.com/penberg/mvcc-rs/commit/6ca377320bb59b52ecc0430b9e5e422e8d61658d)).