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

Time aware LFU (windowing, temporary immunity) #46

Closed
andersfylling opened this issue Sep 20, 2019 · 5 comments
Closed

Time aware LFU (windowing, temporary immunity) #46

andersfylling opened this issue Sep 20, 2019 · 5 comments
Assignees
Labels
kind/enhancement Something could be better. priority/P2 Somehow important but would not block a release. status/accepted We accept to work on it.
Milestone

Comments

@andersfylling
Copy link
Contributor

Would you consider adding a time aware LFU, such that completely new entries can't have the probability of being evicted right after insertion?

Eg. New entries are given a 1 minute time frame to become useful. Potentially increasing survival rates of fresh entries.

@karlmcguire
Copy link
Contributor

Yes, we've experimented with different ways of calculating item value in the eviction process. One of which I've got my eye on is Hyperbolic caching, which lazily evaluates a hyperbolic function to derive item value. It would be easy to include creation time in the function and give items temporary eviction immunity.

We'll look into it more, thanks for the suggestion.

@karlmcguire karlmcguire added the kind/enhancement Something could be better. label Sep 20, 2019
@ben-manes
Copy link

An admission window serves a similar purpose by delaying the evaluation until the item has been idle for a number of accesses. You might compare to that scheme (W-TinyLfu).

@andersfylling
Copy link
Contributor Author

andersfylling commented Sep 20, 2019

An admission window serves a similar purpose by delaying the evaluation until the item has been idle for a number of accesses.

But will this allow increasing the LFU params of the delayed items?

Hyperbolic caching looks awesome. I wanted to write a time aware weighted LFU for my own library. But I might just switch to this as it seems you guys have really put some effort into it.

@ben-manes
Copy link

It would allow the item to build up its frequency if used or be discarded if not. An LRU trace favors a larger delay, whereas an MRU trace favors a lower delay. Hyperbolic, without tinylfu, performs wildly across different traces (see our adaptivity paper),

@karlmcguire karlmcguire added this to the future milestone Sep 22, 2019
@karlmcguire karlmcguire self-assigned this Sep 22, 2019
@karlmcguire karlmcguire changed the title Time aware LFU Time aware LFU (windowing, temporary immunity) Sep 22, 2019
@martinmr martinmr added priority/P2 Somehow important but would not block a release. status/accepted We accept to work on it. labels Feb 25, 2020
@minhaj-shakeel
Copy link
Contributor

Github issues have been deprecated.
This issue has been moved to discuss. You can follow the conversation there and also subscribe to updates by changing your notification preferences.

drawing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Something could be better. priority/P2 Somehow important but would not block a release. status/accepted We accept to work on it.
Projects
None yet
Development

No branches or pull requests

5 participants