Transient Region and Entry Statistics
For replicated, distributed, and local regions, Geode provides a standard set of statistics for the region and its entries.
Geode gathers these statistics when the
--enable-statistics parameter of the
create region command of
gfsh is set to true or in cache.xml the region attribute
statistics-enabled is set to true.
Note: Unlike other Geode statistics, these region and entry statistics are not archived and cannot be charted.
Note: Enabling these statistics requires extra memory per entry. See Memory Requirements for Cached Data.
These are the transient statistics gathered for all but partitioned regions:
- Hit and miss counts. For the entry, the hit count is the number of times the cached entry was accessed through the
Region.getmethod and the miss count is the number of times these hits did not find a valid value. For the region these counts are the totals for all entries in the region. The API provides
getmethods for the hit and miss counts, a convenience method that returns the hit-to-miss ratio, and a method for zeroing the counts.
- Last accessed time. For the entry, this is the last time a valid value was retrieved from the locally cached entry. For the region, this is the most recent “last accessed time” for all entries contained in the region. This statistic is used for idle timeout expiration activities.
- Last modified time. For the entry, this is the last time the entry value was updated (directly or through distribution) due to a load, create, or put operation. For the region, this is the most recent “last modified time” for all entries contained in the region. This statistic is used for time to live and idle timeout expiration activities.
The hit and miss counts collected in these statistics can be useful for fine-tuning your system’s caches. If you have a region’s entry expiration enabled, for example, and see a high ratio of misses to hits on the entries, you might choose to increase the expiration times.
Retrieve region and entry statistics through the
getStatistics methods of the