Skip to content

Prewarm caches for next block using prefetch message#649

Draft
damian-orzechowski wants to merge 20 commits intomainfrom
feature/digest-message-prefetch-2
Draft

Prewarm caches for next block using prefetch message#649
damian-orzechowski wants to merge 20 commits intomainfrom
feature/digest-message-prefetch-2

Conversation

@damian-orzechowski
Copy link
Copy Markdown
Collaborator

Utilize MsgForPrefetch argument of DigestMessage to pre-warm storage caches for upcoming block processing.

The mechanism is similar to prewarming, but instead of working on same block scope (block N) it parallelizes transaction execution of N+1 block while processing block N. To achieve that following changes were made:

  • triggering prefetching by RPC module at the beginning of DigestMessage call
  • using modified PreBlockCaches which have front and back instance. Caches are always filled using back instance and read from front instance.
  • when main processing thread has finished processing block N, pre-warming for N+1 is cancelled and all state changes are applied to warm cache. Instances are swapped for next block (DigestMessage call)

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