Search code examples
ignite

Ignite offheapUsedSize doesn't get reset after clear cache


I got Ignite offheapUsedSize through igenite.dataRegionMetircs().getOffheapUsedSize(), but after I clear cache, this value doesn't get reset, it just keep increasing as time going, I have tried all methods it still not work.

IgniteCache.clear
IgniteCache.removeAll
IgniteCache.clearStatistics()
IgniteCache.resetQueryMetrics
IgniteCache.resetQueryDetailMetrics
IgniteCache.destroy

offheapUsedSize get reset only after I restart the server.


Solution

  • This is working as design http://apache-ignite-users.70518.x6.nabble.com/how-to-monitor-off-heap-size-used-td27733.html

    This is my way to to get real off heap usage: DataRegionMetricsSnapshot.getTotalUsedPages() * DataRegionMetricsSnapshot.getPageSize()