[ https://issues.apache.org/jira/browse/IGNITE-4797?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15906476#comment-15906476 ]
Kartik Somani commented on IGNITE-4797: --------------------------------------- [My First Bug] The approach that I see is, I'll add the interface for getSystemAllocatedSize() to the CacheMetrics and CacheMetricsMxBean Interface. In CacheMetricsImpl, I'll use GridCacheContext object (cctx) object to get and return the systemAllocatedSize using : cctx.unsafeMemory.systemAllocatedSize(). CacheLocalMetricsMxBean will then call cache.metrics0.getSystemAllocatedSize() to return the metric. Will this work? > Need to expose offheap memory allocated size metric for internal data > structures > -------------------------------------------------------------------------------- > > Key: IGNITE-4797 > URL: https://issues.apache.org/jira/browse/IGNITE-4797 > Project: Ignite > Issue Type: Improvement > Reporter: Andrey Gura > Assignee: Kartik Somani > Labels: newbie > Fix For: 2.0 > > > Offheap caches expose offheap memory allocated size via > {{CacheMetricsMXBean.getOffHeapAllocatedSize()}}. But this metric doesn't > take into account offheap memory that allocated for internal data structures > (GridUnsafeMap and LRU eviction policy). > However Ignite collects this metric (see > GridUnsafeMemory.systemAllocatedSize() method). > Need to expose this metric via {{CacheMetricsMXBean}}. -- This message was sent by Atlassian JIRA (v6.3.15#6346)