1 Reply Latest reply on Sep 30, 2015 10:31 AM by nadirx

    Evaluate number of items in memory

    sberthez

      Hi,

      I use ModeShape framework that use natively Infinispan to manage objects. I try to evaluate memory usage and Infinispan number of items in memory during batch load of objects or query executions into ModeShape. I cannot control the way ModeShape works so i do not know how many items is generated for each operation. Then, is it possible to know number of items currently managed by Infinispan in memory with Infinispan API ? It will help me to determine an ratio of items/memory consumption for each operation and then evaluate memory needs for the complete batch or queries. I need this information to tune eviction strategy for Infinispan as long as it can only be driven by number of items and not by memory usage.

       

      Is there any other possibility to monitor Infinispan ?

       

      Regards

        • 1. Re: Evaluate number of items in memory
          nadirx

          Hi Sebastien,

           

          you can enable container statistics which will expose the caches over JMX. We have a page listing all exposed MBeans. Each cache will allow you to retrieve the NumberOfEntries for the local node as well as the NumberOfEntries across the entire cluster (for clustered caches). Infinispan 8.0 has also introduced memory-based eviction which allows you to specify (and monitor) the maximum allowed occupation of a cache in bytes, although I don't know when Modeshape plans to support that.