[ 
https://issues.apache.org/jira/browse/IGNITE-5461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16049399#comment-16049399
 ] 

Ivan Rakov commented on IGNITE-5461:
------------------------------------

Implementations of described metrics are obsolete in 2.0. I propose the 
following code:

*Heap* (in order to take into account both near entries and entries held by 
active transactions):
{noformat}
cache.localSize(CachePeekMode.ONHEAP, CachePeekMode.PRIMARY, 
CachePeekMode.BACKUP, CachePeekMode.NEAR)
{noformat} 
*Off-Heap*:
{noformat}
cache.localSize(CachePeekMode.OFFHEAP, CachePeekMode.PRIMARY, 
CachePeekMode.BACKUP)
{noformat} 
*Total*: Heap + Off-Heap

*Off-Heap Memory*: not easy to implement, separate ticket created 
https://issues.apache.org/jira/browse/IGNITE-5490

> Visor shows wrong statistics for off heap memory
> ------------------------------------------------
>
>                 Key: IGNITE-5461
>                 URL: https://issues.apache.org/jira/browse/IGNITE-5461
>             Project: Ignite
>          Issue Type: Bug
>          Components: cache
>    Affects Versions: 2.0
>            Reporter: Mikhail Cherkasov
>            Assignee: Ivan Rakov
>              Labels: important
>             Fix For: 2.1
>
>         Attachments: CreateCache.java, visor-config.xml
>
>
> Visor show that data is stored in Heap, while the data is in off heap:
> Total: 1
>     Heap: 1
>     Off-Heap: 0
>     Off-Heap Memory: 0
> while:
> cache.localPeek("Key1", ONHEAP) == null
> cache.localPeek("Key1", OFFHEAP) == Value
> reproducer is attached.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to