Skip to content

Conversation

@7layermagik
Copy link

Summary

Adds a new config option to persist the compiled SBPF program cache across restarts:

  • persist_program_cache - When enabled, saves compiled programs to disk on shutdown and reloads them on startup

Since SBPF program compilation is expensive and the same programs are used repeatedly during replay, persisting the cache can significantly reduce warmup time after restarts.

Changes

  • New file pkg/accountsdb/program_cache.go with serialization/deserialization for the program cache
  • Config option under [tuning] section: persist_program_cache = true/false (default: false)
  • Reduced vote account cache from 5000 to 2000 entries (only ~600 validators on mainnet)

Usage

In config.toml:

[tuning]
    persist_program_cache = true

The cache file is stored at {accounts_path}/program_cache.gob.

Add a new config option `persist_program_cache` under [tuning] that:
- Saves compiled SBPF programs to disk on shutdown
- Reloads them on startup to speed up replay warmup

Since program compilation is expensive and the same programs are used
repeatedly, persisting the cache can significantly reduce warmup time
after restarts.

Also reduces vote account cache size from 5000 to 2000 entries since
there are only ~600 validators on mainnet.

Config: tuning.persist_program_cache = true/false (default: false)
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.

2 participants