hazelcast - map eviction stats

547 Views Asked by At

Eviction from a hazelcast IMap could happen due to either ttl getting expired, or due to some threshold getting hit due to eviction policy settings.

But does management center or the java object itself provide any stats on how may entries were evicted and for what reason?

I am not able to find such a metric in management center, and the getLocalMapStats method on IMap doesn't seem to give out any eviction stats.

There is a stat called 'remove' in management center, but its value (throughput/latency) is always 0. I guess it is only counting the explicit removals from the map and is not accounting for the evictions.

(I guess another way could be adding eviction lister as per http://docs.hazelcast.org/docs/latest-development/manual/html/Distributed_Events/Event_Listener_for_Members/Listening_for_Map_Events.html and define a custom metric for eviction.)

1

There are 1 best solutions below

0
Alparslan Avci On

For now (as v3.9.2), there are no available stats for Map eviction events but this feature is expected to be added in future releases. Here is another community request for it: https://github.com/hazelcast/hazelcast/issues/3009

As you stated, you can use EntryEvictedListener to define a custom metric for evicted entries.