fjall-rs / lsm-tree

K.I.S.S. LSM-tree implementation in safe Rust
https://fjall-rs.github.io/
Apache License 2.0
47 stars 2 forks source link
key-value-storage log-structured log-structured-merge-tree lsm lsm-tree lsmt mit-license rust rust-lang

CI docs.rs Crates.io MSRV

A K.I.S.S. implementation of log-structured merge trees (LSM-trees/LSMTs) in Rust.

This crate only provides a primitive LSM-tree, not a full storage engine. For example, it does not ship with a write-ahead log. You probably want to use https://github.com/fjall-rs/fjall instead.

About

This is the most feature-rich LSM-tree implementation in Rust! It features:

Keys are limited to 65536 bytes, values are limited to 2^32 bytes. As is normal with any kind of storage engine, larger keys and values have a bigger performance impact.

Feature flags

bloom

Uses bloom filters to reduce superfluous disk I/O during point reads, improving performance, but also increasing memory usage.

Disabled by default.

Stable disk format

The disk format is stable as of 1.0.0. Future breaking changes will result in a major version bump and a migration path.

License

All source code is licensed under MIT OR Apache-2.0.

All contributions are to be licensed as MIT OR Apache-2.0.

Development

Run benchmarks

cargo bench --features bloom

Footnotes

[1] https://rocksdb.org/blog/2017/05/12/partitioned-index-filter.html