#value #byte #lsm

bin+lib tiny-lsm

a dead-simple in-memory blocking LSM tree for constant-sized keys and values

16 unstable releases (3 breaking)

0.4.6 Apr 21, 2022
0.4.5 Dec 21, 2021
0.3.1 Dec 20, 2021
0.2.4 Dec 6, 2021
0.1.4 Dec 1, 2021

#451 in Compression

GPL-3.0 license

42KB
891 lines

tiny-lsm

Super simple in-memory blocking LSM for constant-size keys and values.

Despite being single-threaded and blocking, this is still capable of outperforming a wide range of other storage systems.

This is a great choice when you:

  • want to fit the whole data set in-memory
  • can model your keys and values in a bounded number of bytes

Tested with fuzzcheck, and the API and internals are intentionally being kept minimal to reduce bugs and improve performance for the use cases that this works well for.

Pairs extremely well with the zerocopy crate for viewing the fixed size byte arrays as typed data without paying expensive deserialization costs.

Dependencies

~3.5MB
~60K SLoC