Skip to content

Instantly share code, notes, and snippets.

@Kerollmops
Last active August 25, 2024 10:05
Show Gist options
  • Save Kerollmops/cafc2b4f9216a93d4cc5da1b6e3e7fae to your computer and use it in GitHub Desktop.
Save Kerollmops/cafc2b4f9216a93d4cc5da1b6e3e7fae to your computer and use it in GitHub Desktop.
LMDB is still the best for concurrent reads

Those are the redb benchmarks with different key value stores and the two different versions of LMDB living on two different branches: mdb.master and mdb.master3. The benchmarks were done on my iMac M3 (2023).

redb lmdb (mdb.master) lmdb (mdb.master3) rocksdb sled sanakirja
bulk load 2.97s 982.90ms 987.29ms 5.40s 4.49s 865.30ms
individual writes 443.95ms 7.30ms 7.37ms 2.49ms 403.99ms 52.14ms
batch writes 4.07s 2.09s 2.10s 222.74ms 1.38s 3.63s
len() 2.96µs 125.00ns 125.00ns 174.93ms 630.46ms 36.70ms
random reads 701.95ms 766.74ms 787.19ms 2.29s 909.50ms 685.38ms
random reads 697.24ms 755.19ms 781.41ms 2.05s 898.95ms 686.01ms
random range reads 1.62s 1.15s 1.15s 3.68s 3.71s 1.03s
random range reads 1.62s 1.25s 1.15s 3.55s 3.71s 1.03s
random reads (4 threads) 205.71ms 207.71ms 210.11ms 613.05ms 273.04ms 278.16ms
random reads (8 threads) 178.93ms 140.11ms 120.04ms 500.02ms 233.05ms 492.31ms
random reads (16 threads) 187.34ms 185.21ms 151.11ms 462.72ms 242.46ms 559.02ms
random reads (32 threads) 183.29ms 143.41ms 128.85ms 403.92ms 240.05ms 549.28ms
removals 2.31s 840.69ms 762.52ms 2.35s 1.62s 980.74ms
size after bench 1.00 GiB 584.85 MiB 584.88 MiB 383.33 MiB 458.50 MiB 4.00 GiB
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment