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

Hacky benchmark of history reindex #6055

Draft
wants to merge 4 commits into
base: martin/feature/batch-history-reindex-writes
Choose a base branch
from

Conversation

martintomazic
Copy link
Contributor

@martintomazic martintomazic commented Feb 11, 2025

Hacky Bench-marking only:

Warning

Ignore code quality etc, this is benchmark only. Corner case logic is also probably off sometimes, logs are also often just copied.

 prune:
        strategy: none

batching has minor bug if you are doing prunning.

How to benchmark

Change:

  • writeWorkers if you want to write in parallel
  • batchSize if you want to batch`
  • readWorkers if withing a batch processing you want to fetch consensus blocks and data in parallel.

** writeWorkers=1 + batchSize=1 should give you same benchmark as is on the main.**

grepping for history reindex0 should output relevant logs.

Copy link

netlify bot commented Feb 11, 2025

Deploy Preview for oasisprotocol-oasis-core canceled.

Name Link
🔨 Latest commit 5764e2d
🔍 Latest deploy log https://app.netlify.com/sites/oasisprotocol-oasis-core/deploys/67add46e53ba7c0008beffa0

You can set parallel writting by increasing number of writeWorkers.
Note that if you set batchSize=1 and writeWorkers=1 you mimic
current behaviour from main. I can confirm becnmarks match.

Finally we also added more granular benchmarking of reads and writes.
We create a read worker pool per worker, that we use during batch processing.
E.g. if you set writeWorkers=1, then batching is happening sequentially,
but withing a batch we are fetching (reading) data in parallel.
@martintomazic martintomazic force-pushed the martin/benchmark/history-reindex branch from c24a60d to 5764e2d Compare February 13, 2025 11:15
@martintomazic martintomazic changed the base branch from master to martin/feature/batch-history-reindex-writes February 13, 2025 11:17
@martintomazic martintomazic changed the title Benchmark history reindex (N workers reindexing consensus) Hacky benchmark of history reindex Feb 13, 2025
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.

1 participant