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

FVM Programs cache invalidation 🆕 #6507

Open
Tracked by #6577 ...
janezpodhostnik opened this issue Sep 26, 2024 · 0 comments
Open
Tracked by #6577 ...

FVM Programs cache invalidation 🆕 #6507

janezpodhostnik opened this issue Sep 26, 2024 · 0 comments
Assignees
Labels
Bug Something isn't working Execution Cadence Execution Team Performance

Comments

@janezpodhostnik
Copy link
Contributor

janezpodhostnik commented Sep 26, 2024

Why (Objective)

When programs cache gets invalidated each block it degrades execution performance and causes operational issues, with Execution node caching-up speed being only ~6 blocks/sec.

How will we measure success (Key Results)

  • Programs cached across blocks > 0
  • TPS improvement from 450 to ~600
  • Execution node block catch-up rate increses from ~6 to ~30 blocks/sec

🐞 Bug Report

Programs cache is still invalidates on every block boundary on testnet and mainnet even after #6347. It works correctly on benchnet.

What is the severity of this bug?

Should have: The performance gains for execution are >7% (7% improvement is what we get on token transfer TPS measurements, but in that scenario only a few contracts are used every block, so that is an underestimate)

Another consideration is the catch-up speed for ENs. It used to be ~30 blocks per second and it is currently ~10 blocks (however not all of that is from this issue)

Reproduction steps

Not really reproduction steps, but you can see that the programs cached across blocks are 0 on this metric:

image

Specifications

Fix

There are two options:

  1. force un-inlining of registers containing the Random Source History and the Metering settings. This would mean special casing for these registers.

  2. Move the metering settings from the service account to a new account, and make changes in the FVM to use that account to read the metering settings.

Option 2. seems better.

Effort Estimate

~2 dev/weeks

@janezpodhostnik janezpodhostnik added Bug Something isn't working Performance labels Sep 26, 2024
@janezpodhostnik janezpodhostnik self-assigned this Sep 26, 2024
@j1010001 j1010001 changed the title [FVM] Programs cahce invalidation still to agressive on mainnet and testnet [FVM] Programs cache invalidation still to agressive on mainnet and testnet Oct 9, 2024
@j1010001 j1010001 changed the title [FVM] Programs cache invalidation still to agressive on mainnet and testnet FVM Programs cache invalidation Oct 10, 2024
@j1010001 j1010001 self-assigned this Oct 10, 2024
@vishalchangrani vishalchangrani added the Execution Cadence Execution Team label Oct 10, 2024
@vishalchangrani vishalchangrani changed the title FVM Programs cache invalidation FVM Programs cache invalidation 🆕 Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Execution Cadence Execution Team Performance
Projects
None yet
Development

No branches or pull requests

3 participants