Make State Cache Pruning Smarter #2154
Labels
prio-medium
Resolve this some time soon (tm).
scope-performance
Performance issue and ideas to improve performance.
scope-security
Issues that fix security issues: DOS, key leak, CVEs.
Is your feature request related to a problem? Please describe.
Currently, the pruning of the state caches is very basic, controlled by calling
cache.prune
on regular regular intervals, when the chain processes a checkpoint. This naive strategy leads to more memory use than is needed.When the chain is healthy, or when chain regen is low, we may need fewer states cached.
When the chain is unhealthy, or when more states are being requested, we may need more states cached.
Describe the solution you'd like
Implement a chain-level state manager that more intelligently manages the state cache pruning.
First steps would include mapping out a coherent strategy that would take into account both healthy and unhealthy chain conditions.
Describe alternatives you've considered
Maintain status quo.
Additional context
See #2152 #2153
The text was updated successfully, but these errors were encountered: