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

LRU cache hit rate doesn't seem good enough for real use cases #1

Open
ebroder opened this issue Aug 3, 2021 · 0 comments
Open

LRU cache hit rate doesn't seem good enough for real use cases #1

ebroder opened this issue Aug 3, 2021 · 0 comments

Comments

@ebroder
Copy link
Owner

ebroder commented Aug 3, 2021

I had an occasion today to pull some data off of an EBS snapshot and tried to use ebuse for it. It was exhaustingly slow, and it seemed like it was because it had to keep re-fetching the same blocks. I don't know for sure, but I suspect it was fetching things like directory records. I increased the LRU cache size here:

blockCache, err := lru.NewARC(100)

Bumping it to 20000 (enough to store the entire 10G EBS snapshot in memory if necessary) resulted in a significant speed improvement.

It'd be great to have more data about what blocks the filesystem access frequently (say, for an ext4 filesystem) and if there's a different caching pattern that would work more effectively. (Maybe a cache pattern that's aware of frequency of access instead of pure LRU?)

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

No branches or pull requests

1 participant