Skip to content

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

@ebroder

Description

@ebroder

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?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions