[Announce] leveldb in Go

252 views
Skip to first unread message

robert engels

unread,
Sep 18, 2022, 6:43:44 PM9/18/22
to golang-nuts
Hi,

I am pleased to announce the release of robaho/leveldb It is a key-value store using LSM trees based on my original keydb but has been updated to use an api which is very similar to Google’s C++ LevelDB.

It has some features still under development, like sequence/snapshots and reverse iteration, but it is stable.

The performance is excellent. Running tests on the same hardware/os:

Google LevelDB

fillseq      :       5.487 micros/op    
fillsync     :   11305.127 micros/op
fillbatch    :       2.338 micros/op
readrandom   :       5.595 micros/op
readseq      :       0.130 micros/op

Robaho LevelDB

fillseq      :       4.392 micros/op    
fillsync     :      48.591 micros/op
fillbatch    :       1.220 micros/op
fillnoflush  :       1.439 micros/op  (a special “unsafe” mode)   
readrandom   :       3.649 micros/op
readseq      :       0.111 micros/op

There is also a remote access module to allow sharing of a db across processes (uses gRPC) available robaho/leveldbr

leveldb contains a lock-free for read skip-list data structure which may be useful to some on its own.

btw, the race detector reports 0 issues :)

Also, I am not certain why the fillsync is so drastically different - the fillsync in robaho/leveldb uses O_SYNC for writing the backing log file - it may be that Google LevelDB uses a higher level that syncs meta data as well.

Still, robaho/leveldb has several test to ensure resiliency against failure during write/close.


Reply all
Reply to author
Forward
0 new messages