Skip to content

Commit

Permalink
Problem: block cache size not count in index/filters (#1531)
Browse files Browse the repository at this point in the history
Solution:
- increase block cache size
  • Loading branch information
yihuang authored Jul 26, 2024
1 parent 71a8c34 commit aedfd55
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/cronosd/opendb/opendb_rocksdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ import (
"github.com/linxGnu/grocksdb"
)

const BlockCacheSize = 1 << 30
// 3G block cache
const BlockCacheSize = 3 << 30

func OpenDB(_ types.AppOptions, home string, backendType dbm.BackendType) (dbm.DB, error) {
dataDir := filepath.Join(home, "data")
Expand Down Expand Up @@ -98,7 +99,6 @@ func NewRocksdbOptions(opts *grocksdb.Options, sstFileWriter bool) *grocksdb.Opt
// block based table options
bbto := grocksdb.NewDefaultBlockBasedTableOptions()

// 1G block cache
bbto.SetBlockCache(grocksdb.NewLRUCache(BlockCacheSize))

// http://rocksdb.org/blog/2021/12/29/ribbon-filter.html
Expand Down

0 comments on commit aedfd55

Please sign in to comment.