bnclabs / gostore

Storage algorithms.
MIT License
35 stars 4 forks source link

bubt: replace block pools with lockless buffer pool. #67

Closed prataprc closed 6 years ago

prataprc commented 6 years ago

Right now, bubt-flusher maintains a buffer pool via a channel in bubtflusher:blocks. Replace this with a lock-less buffer pool.

Additionally, replace Snapshot.readbuffers channel with lock-less buffer pool.

Also replace Snapshot:viewcache, Snapshot:curcache with lock-less pool.

prataprc commented 6 years ago

After every optimization with lock-less buffer pool use dbperf/mod_bubt* to measure throughput and latency improvements along with CPU-profile (pprof.svg)

prataprc commented 6 years ago

a. replacing bubtflusher:blocks with blockpool.

This does not yield much performance improvements, both build time and memory allocation remains more or less the same. Nevertheless, retaining this implementation.