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

Prefetch Improvement #2435

Merged
merged 4 commits into from
Dec 13, 2023
Merged

Prefetch Improvement #2435

merged 4 commits into from
Dec 13, 2023

Conversation

dboehm-avalabs
Copy link
Contributor

Improve Prefetch by not taking the cache write lock for items already present in the cache.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In practice, this was shown to greatly improve concurrent prefetch performance (reads don't need to acquire the write lock on the cache like Put).

I'm wondering if it would make sense to include this optimization directly in the cache vs here or if this is considered non-standard usage/optimization? @StephenButtolph

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure we can directly include this into the cache because the cache would then need to somehow check if the provided value is equal. We could do that just directly with ==, but I feel like if we wanted to do that then we would want to make it more general.

Copy link
Collaborator

@danlaine danlaine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment nit, otherwise lgtm

Co-authored-by: Dan Laine <daniel.laine@avalabs.org>
Signed-off-by: David Boehm <91908103+dboehm-avalabs@users.noreply.github.com>
@dboehm-avalabs dboehm-avalabs added this pull request to the merge queue Dec 13, 2023
Merged via the queue into dev with commit f69d68f Dec 13, 2023
17 checks passed
@dboehm-avalabs dboehm-avalabs deleted the PrefetchImprovement branch December 13, 2023 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

4 participants