Code Monkey home page Code Monkey logo

Comments (4)

cabol avatar cabol commented on August 16, 2024

Hey.

Yes, you can get the cache size by calling the callback c:count_all/2 (e.g.: YourApp.Cache.count_all()). Also, you can configure size/memory limits to the primary/local cache backend for each partition, perhaps if you could share your cache config I could help you out (if you haven't done it already).

Please let me know if that helps, I stay tuned! Thanks!

from nebulex.

benonymus avatar benonymus commented on August 16, 2024

I mean the size as in the size it takes up in memory.
Would writing it to a file with https://hexdocs.pm/nebulex/Nebulex.Cache.html#c:dump/2 give around the same size as the data takes up in memory?

from nebulex.

cabol avatar cabol commented on August 16, 2024

I mean the size as in the size it takes up in memory.

Ok, got it, but yeah, you can only get the number of items in the cache (BTW this is being addressed in the v3).

Would writing it to a file with https://hexdocs.pm/nebulex/Nebulex.Cache.html#c:dump/2 give around the same size as the data takes up in memory?

Yeah, that may give you an idea, but It is not the same, the entries are dumped to the file using Nebulex.Entry.encode/2, which is different how the VM stores them in memory (in the ETS).

from nebulex.

benonymus avatar benonymus commented on August 16, 2024

Hey,

Thanks for the info!
I checked the dumped size, I am certain it is not the cache, even with encoding in mind the diff between the memory usage and the size of the cache dump is too much (cache dump was 88kb the memory we are looking for is in the 500 mbs plus).

I am looking forward to v3!

Cheers

from nebulex.

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.