tendermint / tm-db

Common database interface for various database backends for Tendermint Core and Cosmos SDK
Apache License 2.0
89 stars 136 forks source link

PebbleDB #230

Closed faddat closed 2 years ago

faddat commented 2 years ago

I spoke with the Terra team, and they mentioned that because their CosmWasm usage is high, there were issues with cgo/FFI (Rocks will hit this, as will CosmWasm, and this resulted in high overhead) when using RockDB, making it a less than ideal solution for their needs. Since CosmWasm is being adopted pretty widely in Cosmos, we're experimenting with PebbleDB, which outperforms RocksDB in synthetic benchmark tests.

Currently, the goal of these changes is to be able to test them and see if they increase RPC capacity on relayers, so that the IBC relay network can be more reliable.

codecov[bot] commented 2 years ago

Codecov Report

Merging #230 (83d85ef) into master (e09e4d6) will decrease coverage by 0.05%. The diff coverage is 90.00%.

:exclamation: Current head 83d85ef differs from pull request most recent head 2dd592c. Consider uploading reports for the commit 2dd592c to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #230      +/-   ##
==========================================
- Coverage   68.54%   68.48%   -0.06%     
==========================================
  Files          27       27              
  Lines        2130     2126       -4     
==========================================
- Hits         1460     1456       -4     
  Misses        595      595              
  Partials       75       75              
Impacted Files Coverage Δ
badger_db.go 87.77% <0.00%> (ø)
boltdb.go 57.25% <ø> (ø)
boltdb_batch.go 82.69% <ø> (ø)
boltdb_iterator.go 92.10% <ø> (ø)
cleveldb.go 70.99% <ø> (ø)
cleveldb_batch.go 82.35% <ø> (ø)
db.go 35.00% <ø> (ø)
prefixdb_iterator.go 81.01% <ø> (-0.24%) :arrow_down:
rocksdb.go 72.26% <ø> (ø)
rocksdb_batch.go 84.31% <ø> (ø)
... and 3 more
Impacted Files Coverage Δ
badger_db.go 87.77% <0.00%> (ø)
boltdb.go 57.25% <ø> (ø)
boltdb_batch.go 82.69% <ø> (ø)
boltdb_iterator.go 92.10% <ø> (ø)
cleveldb.go 70.99% <ø> (ø)
cleveldb_batch.go 82.35% <ø> (ø)
db.go 35.00% <ø> (ø)
prefixdb_iterator.go 81.01% <ø> (-0.24%) :arrow_down:
rocksdb.go 72.26% <ø> (ø)
rocksdb_batch.go 84.31% <ø> (ø)
... and 3 more
faddat commented 2 years ago

Remaining things to do here include adding pebbledb to the iavl benchmarks

faddat commented 2 years ago

this contains a bug affecting goleveldb that we added while messing about. I'm going to close it and submit a pr that only touches pebble stuff.