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

Upgrade the cache policy from TinyLFU to W-TinyLFU #249

Open
tatsuya6502 opened this issue Mar 31, 2023 · 1 comment
Open

Upgrade the cache policy from TinyLFU to W-TinyLFU #249

tatsuya6502 opened this issue Mar 31, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@tatsuya6502
Copy link
Member

tatsuya6502 commented Mar 31, 2023

Currently, Moka cache uses TinyLFU as the admission/eviction policies (with a small buffer in front of the LFU filter). While it works well for many workloads like database, search, and analytics, it will not work well for recency-biased workloads, like job queues and event streams.

To provide better hit rate for such workloads, do the followings:

  • Upgrade the cache admission/eviction policy from TinyLFU to Window-TinyLFU (W-TinyLFU).
  • Implement hill climbing to auto-tune the size of the LRU window for current workload.

For more details, see the "Eviction Policy" chapter of an article about Java Caffeine cache:
http://highscalability.com/blog/2019/2/25/design-of-a-modern-cachepart-deux.html

@tatsuya6502
Copy link
Member Author

I started to implement the Window-TinyLFU policy.

@tatsuya6502 tatsuya6502 self-assigned this Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Todo
Development

No branches or pull requests

1 participant