Skip to content

Commit

Permalink
Problem: memory leak in archive node (#1526)
Browse files Browse the repository at this point in the history
* Problem: memory leak in archive node

- Suspect large `application.db`
- try cache index/filters

* Update CHANGELOG.md

Signed-off-by: yihuang <[email protected]>

---------

Signed-off-by: yihuang <[email protected]>
  • Loading branch information
yihuang authored Jul 26, 2024
1 parent ce52c51 commit f6d6cf8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
* [#1500](https://github.com/crypto-org-chain/cronos/pull/1500), [#1503](https://github.com/crypto-org-chain/cronos/pull/1503) Set mempool MaxTx from config (with a default value of `3000`).
* (store) [#1511](https://github.com/crypto-org-chain/cronos/pull/1511) Upgrade rocksdb to `v9.2.1`.
* (block-stm) [#1515](https://github.com/crypto-org-chain/cronos/pull/1515) Improve performance by cache signature verification result between incarnations of same tx.
* (store) [#1526](https://github.com/crypto-org-chain/cronos/pull/1526) Cache index/filters in rocksdb application.db to reduce ram usage.

### Bug Fixes

Expand Down
4 changes: 4 additions & 0 deletions cmd/cronosd/opendb/opendb_rocksdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ func NewRocksdbOptions(opts *grocksdb.Options, sstFileWriter bool) *grocksdb.Opt
bbto.SetPartitionFilters(true)
bbto.SetOptimizeFiltersForMemory(true)

// reduce memory usage
bbto.SetCacheIndexAndFilterBlocks(true)
bbto.SetPinTopLevelIndexAndFilter(true)

// hash index is better for iavl tree which mostly do point lookup.
bbto.SetDataBlockIndexType(grocksdb.KDataBlockIndexTypeBinarySearchAndHash)

Expand Down

0 comments on commit f6d6cf8

Please sign in to comment.