Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem: memory leak in archive node (backport #1526) #1527

Merged
merged 2 commits into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ jobs:
env:
TESTS_TO_RUN: ${{ matrix.tests }}
steps:
- name: Create more disk space
run: sudo rm -rf /usr/share/dotnet && sudo rm -rf /opt/ghc && sudo rm -rf "/usr/local/share/boost" && sudo rm -rf "$AGENT_TOOLSDIRECTORY"

- uses: actions/checkout@v3
with:
fetch-depth: 0
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* (store) [#1510](https://github.com/crypto-org-chain/cronos/pull/1510) Upgrade rocksdb to `v9.1.1`.
* (store) [#1511](https://github.com/crypto-org-chain/cronos/pull/1511) Upgrade rocksdb to `v9.2.1`.
* (e2ee) [#1513](https://github.com/crypto-org-chain/cronos/pull/1513) Add pubkey subcommand to e2ee cli.
* (store) [#1526](https://github.com/crypto-org-chain/cronos/pull/1526) Cache index/filters in rocksdb application.db to reduce ram usage.

*Jul 7, 2024*

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
Loading