GithubHelp home page GithubHelp logo

Comments (3)

karlmcguire avatar karlmcguire commented on April 27, 2024

This is probably because of the TinyLFU admission policy rejecting new Sets in the first case, due to the incoming items not being deemed "valuable" enough. In the second case, the low number of counters is causing a high amount of collisions when TinyLFU is checking for incoming item value and most of them are getting through.

I'm not sure of your use case but in the first case you're probably only checking the initial Set. Right now, Ristretto expects you to call Set multiple times (with missed Get calls as well), this is the process of "building up item value" within TinyLFU. Eventually the Set will succeed when it's found to be a valuable item.

Could you post the full code you're using to check the hit ratio?

from ristretto.

karlmcguire avatar karlmcguire commented on April 27, 2024

Just checking in to make sure this still isn't an issue?

from ristretto.

nisdas avatar nisdas commented on April 27, 2024

Hey @karlmcguire, sorry for the late reply, I must have missed this.

This is probably because of the TinyLFU admission policy rejecting new Sets in the first case, due to the incoming items not being deemed "valuable" enough.

In that case, in my situation each new object has a few sets. But I am guessing it doesn't have enough new sets to be valuable enough so that it is admitted to the cache. So once the cache is full basically no new object can be admitted in, as not enough set/gets are called on it. However what about old objects in the cache that do not have anymore gets called on them ? They do not seem to be getting evicted. Would they only be evicted if a new item is 'valuable' enough to be admitted in ?

from ristretto.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.