Code Monkey home page Code Monkey logo

Comments (4)

zhangchiqing avatar zhangchiqing commented on May 18, 2024 1

Thanks @awishformore and @karlmcguire .

Seems there was no leaking, 8G was the actual amount of memory needed given the config like that. The 150MB was just because Go's GC is fast enough to recycle it right away when the cache instance never leaves its local scope.

Closing now.

from ristretto.

karlmcguire avatar karlmcguire commented on May 18, 2024

Looks like cache.Close() is not sufficiently releasing memory.

from ristretto.

awfm9 avatar awfm9 commented on May 18, 2024

Hi @karlmcguire, I work with @zhangchiqing, and there was some implicit behaviour that made it hard to identify the problem was on our side. However, going through the ristretto code, it's possible the documentation is inaccurate on the NumCounters parameter. Taking into account the bloom filter, I think I came out at a memory usage that is about 4x what the comment on that parameter claims (2 bytes per entry)?

from ristretto.

karlmcguire avatar karlmcguire commented on May 18, 2024

@awishformore That sounds about right. We have since added multiple counter "rows" (currently 4, which is standard) with seeds for a 2-3% hit ratio increase. I will update the documentation.

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.