speedb-io / speedb

A RocksDB compliant high performance scalable embedded key-value store
https://www.speedb.io/
Apache License 2.0
912 stars 71 forks source link

spdb memtable #22

Closed ayulas closed 2 years ago

ayulas commented 2 years ago

Why: Improve write performance (for multiple and single threads) Allow parallelism when working with the memtable

What : Inserting data into the memtable without sorting it first will eliminate the locking constraints of the write process. Since data is inserted unsorted a method of getting fast read is needed - generate 1M buckets and add the keys based on hash to one of them - statistically will be one per bucket.

Who: Write and Read while wrote oriented workload.

ayulas commented 2 years ago

@erez-speedb pls test this feature. note that now the hash spd is plugable so when you run the db bench you need to set --memtablerep=speedb.HashSpdRepFactory

ayulas commented 2 years ago

pls add to the db bench make ROCKSDB_PLUGINS=speedb

erez-speedb commented 2 years ago

I see the hash has changed, restarting the performance tests.

erez-speedb commented 2 years ago

No improvement, no degradation in short test and small obj https://admin.speedb.io/performance?items=Us28RNldCnAJsAvolNO7&items=YIisPzntUekVdQPu7Fii&colors=%23F06292&colors=%2300796b https://admin.speedb.io/performance?items=sgDc2TV9fp99lLZ4UCRE&items=iUXlkR0Q1dBiuJC1qJF5&colors=%2300796b&colors=%23ec407a Some improvement with large obj test https://admin.speedb.io/performance?items=NBG0L8I7cnVGBLaLFuf6&items=8XHUSwkEKQRY3slFXvWo&colors=%23F06292&colors=%2300796b

erez-speedb commented 2 years ago

Ran the small obj again, https://admin.speedb.io/performance?items=1IjlM1rRr0UTCJOEiGkp&items=sgDc2TV9fp99lLZ4UCRE&colors=%23F06292&colors=%2300796b