1 Reply Latest reply on Apr 10, 2013 8:34 AM by mgencur

    Eviction statistics Configuration

    vedanth

      Hi,

         

           Am using jboss 7.1.1 along with hibernate and infinispan for caching. Am struck with the statistics configuration.

       

      Once the entities are loaded on to the cache, from jconsole i can get the following statistics readWriteRatio, evictions, timeSinceReset, elapsedTime, averageReadTime, removeHits, removeMisses    

      hitRatio, numberOfEntries , misses, hits, averageWriteTime, stores which is very useful.

       

      However is there any way to get the statistics for the following scenarios:

      1>Number  of entities evicted because of max_idle expiration.

      2>Number of entities evicted because of LRU eviction.

      3>Heap space occupied by each entity cache regin.

       

      What does the evictions attribute shown in jconsole actually indicate? max_idle eviction or LRU eviction.

      The evictions attribute shown in jconsole shows 0 always.

       

       

      Configuration in persistence.xml for cache:

      --------------------------------------------------------------

       

      <property name="hibernate.cache.infinispan.entity.eviction.strategy" value= "LRU"/>

      <property name="hibernate.cache.infinispan.entity.expiration.wake_up_interval" value= "2000"/>

      <property name="hibernate.cache.infinispan.entity.eviction.max_entries" value= "8"/>

      <property name="hibernate.cache.infinispan.entity.expiration.max_idle" value= "180000"/>

      <property name="hibernate.cache.infinispan.statistics" value="true"/>

      <property name="hibernate.cache.use_second_level_cache" value="true"/>

       

      Thanks,

      Vedanth

        • 1. Re: Eviction statistics Configuration
          mgencur

          The answers are the following:

          1) - NO

          2) - NO (only the number of evicted entries, no matter if the strategy is LRU or LIRS

          3) - NO

           

          The maxIdle attribute is not related to "eviction" but to "expiration", i.e. eviction means that entries are evicted from memory (using either LIRS or LRU) but typically moved to a persistent storage, the expiration means that entries are removed altogether (and cluster wide) - not moved to a pers. storage