-
Notifications
You must be signed in to change notification settings - Fork 166
feat(f3): blockstore read cache for F3.GetPowerTable #5674
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
base: main
Are you sure you want to change the base?
Conversation
What's the memory overhead? Should the cache size be configurable? |
13.7MiB on mainnet according to the log
The current value has been fine-tuned for mainnet and I don't think it needs to be made configurable |
f361696
to
7f684d9
Compare
@@ -157,24 +161,33 @@ impl GetPowerTable { | |||
ctx: &Ctx<impl Blockstore + Send + Sync + 'static>, | |||
ts: &Arc<Tipset>, | |||
) -> anyhow::Result<Vec<F3PowerEntry>> { | |||
const BLOCKSTORE_CACHE_CAP: usize = 65536; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's note the memory overhead as a comment here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Summary of changes
This PR addresses #5664 with a different but simpler approach
Changes introduced in this pull request:
Log on mainnet
Reference issue to close (if applicable)
Closes
Other information and links
Change checklist