Infinispan Cache Number of Entries: Difference between revisions
Line 4: | Line 4: | ||
The ''number of entries'' is a read-only Infinispan cache metric representing the current number of cache entries (key/value pairs) maintained by the cache node being interrogated. Note that for distributed or replicated caches, the node may maintain "original" entries and duplicated entries. The value of "number of entries" accounts for ''all'' entries, either original or duplicates, physically present on the node that is being interrogated. The value has no bearing on the total number of distinct entries in the logical cache, which is exposed as "[[#Clusterwide_Number_of_Entries|clusterwide number of entries]]". Unlike the "clusterwide number of entries", the "number of entries" seems to be synchronized across the cluster on each write. | The ''number of entries'' is a read-only Infinispan cache metric representing the current number of cache entries (key/value pairs) maintained by the cache node being interrogated. Note that for distributed or replicated caches, the node may maintain "original" entries and duplicated entries. The value of "number of entries" accounts for ''all'' entries, either original or duplicates, physically present on the node that is being interrogated. The value has no bearing on the total number of distinct entries in the logical cache, which is exposed as "[[#Clusterwide_Number_of_Entries|clusterwide number of entries]]". Unlike the "clusterwide number of entries", the "number of entries" seems to be synchronized across the cluster on each write. | ||
The number of entries is maintain as an Integer. May return null if the cache is not started. | |||
For configuration details see "[[Infinispan_Cache_Container_Configuration#owners|owners]]". | For configuration details see "[[Infinispan_Cache_Container_Configuration#owners|owners]]". | ||
The metric is | The metric is available as JMX and CLI attributes: | ||
* [[JDG 6 individual cache number of entries]] | |||
* [[JDG 7 container-level number of entries]] | |||
* [[JDG 7 individual cache number of entries]] | |||
<pre> | <pre> | ||
jboss.infinispan:type=Cache,name="<cache-name>(dist_sync)",manager="clustered",component=Statistics | jboss.infinispan:type=Cache,name="<cache-name>(dist_sync)",manager="clustered",component=Statistics | ||
</pre> | </pre> | ||
=Clusterwide Number of Entries= | =Clusterwide Number of Entries= |
Revision as of 17:33, 20 October 2016
Internal
Overview
The number of entries is a read-only Infinispan cache metric representing the current number of cache entries (key/value pairs) maintained by the cache node being interrogated. Note that for distributed or replicated caches, the node may maintain "original" entries and duplicated entries. The value of "number of entries" accounts for all entries, either original or duplicates, physically present on the node that is being interrogated. The value has no bearing on the total number of distinct entries in the logical cache, which is exposed as "clusterwide number of entries". Unlike the "clusterwide number of entries", the "number of entries" seems to be synchronized across the cluster on each write.
The number of entries is maintain as an Integer. May return null if the cache is not started.
For configuration details see "owners".
The metric is available as JMX and CLI attributes:
- JDG 6 individual cache number of entries
- JDG 7 container-level number of entries
- JDG 7 individual cache number of entries
jboss.infinispan:type=Cache,name="<cache-name>(dist_sync)",manager="clustered",component=Statistics
Clusterwide Number of Entries
A read-only int representing the cluster-wide number of distinct entries in the logical cache maintained by the cluster being interrogated. May return null if the cache is not started. The metrics is different than number-of-entries metric.
There are cases cases where clusterwide-number-of-entries is 0 for a non-zero number of keys, and owners=2. In general, it seems it is not continuously updated under load. The metric seems to "catch up" as more keys are added..
For configuration details see "owners".