Comments (4)
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.
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.
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.
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)
- Nebulex v3 Roadmap
- Unable to use module attributes when specifying a MFA cache within the decorator HOT 2
- Is there a good way to evict multiple caches at once by some conditions? HOT 6
- Support query/match values for the option `:all_entries` in the `cache_evict` decorator HOT 1
- Unregistering cache in registry happens after cache shuts down HOT 2
- Errors when storing nil values HOT 1
- Processes reading from cache blocked by generational gc process HOT 1
- Docs on Migrating to v2 from Nebulex.Adapters.Dist.Cluster HOT 5
- `Nebulex.Cache` callbacks mention "Shared Options" section that do not exist
- Support for functions that can set TTL in Decorator similar to Match HOT 9
- Where to use load/2, dump/2 HOT 4
- random :erpc, :timeout with partitioned get HOT 2
- Seeing Nebulex.RPCError during deployments with partitioned adapter HOT 4
- Nebulex.RegistryLookupError HOT 9
- Ambiguity regarding ttl and gc_interval relation. HOT 4
- Replicated adapter syncing during rolling deployment HOT 5
- Bug on Local adapter when using `delete_all` and keys are nested tuples: not a valid match specification HOT 3
- is allocated_memory param global on per node when using Nebulex.Adapters.Partitioned with :shards HOT 2
- Dangling reference on `cache_evict` when using referenced keys HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nebulex.