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

[blockindex] reduce indexbuilder PutBlocks() size to 100 #4531

Merged
merged 2 commits into from
Dec 26, 2024

Conversation

dustinxie
Copy link
Member

Description

When building index for testnet at block height around 25476000, it was found that average write entries to index a block can reach 6k~11.2k, so reduce the number of block (to index at a time) to make sure the total write entries remain reasonable

index builder height = 25476000
tip height = 25835080
batch size = 1093542
{"level":"info","ts":"2024-12-22T00:06:01.709Z","caller":"blockindex/indexbuilder.go:155","msg":"Finished indexing blocks up to","ioAddr":"io1yvcrzj02dupy35p39ryy6eja9ujs9p0tlfxkcu","height":25476200}
batch size = 1253260
{"level":"info","ts":"2024-12-22T00:06:40.968Z","caller":"blockindex/indexbuilder.go:155","msg":"Finished indexing blocks up to","ioAddr":"io1yvcrzj02dupy35p39ryy6eja9ujs9p0tlfxkcu","height":25476400}
batch size = 1397524
{"level":"info","ts":"2024-12-22T00:09:11.703Z","caller":"blockindex/indexbuilder.go:155","msg":"Finished indexing blocks up to","ioAddr":"io1yvcrzj02dupy35p39ryy6eja9ujs9p0tlfxkcu","height":25476600}
batch size = 2242264
{"level":"info","ts":"2024-12-22T00:13:24.166Z","caller":"blockindex/indexbuilder.go:155","msg":"Finished indexing blocks up to","ioAddr":"io1yvcrzj02dupy35p39ryy6eja9ujs9p0tlfxkcu","height":25476800}

Fixes #(issue)

Type of change

Please delete options that are not relevant.

  • [] Bug fix (non-breaking change which fixes an issue)
  • [] New feature (non-breaking change which adds functionality)
  • Code refactor or improvement
  • [] Breaking change (fix or feature that would cause a new or changed behavior of existing functionality)
  • [] This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • make test
  • [] fullsync
  • [] Other test (please specify)

Test Configuration:

  • Firmware version:
  • Hardware:
  • Toolchain:
  • SDK:

Checklist:

  • [] My code follows the style guidelines of this project
  • [] I have performed a self-review of my code
  • [] I have commented my code, particularly in hard-to-understand areas
  • [] I have made corresponding changes to the documentation
  • [] My changes generate no new warnings
  • [] I have added tests that prove my fix is effective or that my feature works
  • [] New and existing unit tests pass locally with my changes
  • [] Any dependent changes have been merged and published in downstream modules

@dustinxie dustinxie changed the title [blockindex] reduce indexbuilder PutBlocks() size to 200 [blockindex] reduce indexbuilder PutBlocks() size to 100 Dec 22, 2024
@dustinxie dustinxie merged commit 36a8913 into iotexproject:master Dec 26, 2024
4 checks passed
@dustinxie dustinxie deleted the enter branch December 26, 2024 00:58
@dustinxie dustinxie restored the enter branch December 26, 2024 00:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants