I am migrating from ehcache to infinispan. In ehcache we have
net.sf.ehcache.Cache.calculateInMemorySize()
to calculate in memory size.
How to calculate in memory size in infinispan?
Infinispan replicates cache entries on a subset of nodes in a cluster and assigns entries to fixed owner nodes. Infinispan requests read operations from owner nodes to ensure it returns the correct value. Infinispan evicts stale data from all nodes whenever operations modify entries in the cache.
Data stores supported by Ehcache include: On-Heap Store - Utilizes Java's on-heap RAM memory to store cache entries. This tier utilizes the same heap memory as your Java application, all of which must be scanned by the JVM's garbage collector.
diskExpiryThreadIntervalSeconds — Sets the number of seconds between runs of the disk expiry thread. The default value is 600. arsystem. ehcache.
Tomas is right, there's no currently no way to calculate size of data in memory. We do however provide users with some guidelines on the memory overhead that Infinispan incurs, which helps users plan their memory requirements. Calculating the size of data in-memory is not trivial to achieve and requires a lot of subtle details to be taken into account (type of JVM, arquitecture...etc).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With