Vyacheslav,
Objects have different size in different runtime (x86 or Power, compress
pointer on or off and so on). So only one possible way to see real size is
do it in runtime. You can see how many bytes was allocated in one thread by
using

import *com.sun.management*.ThreadMXBean;
....
ThreadMXBean bean = (ThreadMXBean) ManagementFactory.getThreadMXBean();
//it return java.*lang*.management.ThreadMXBean
System.out.println(bean.
*getThreadAllocatedBytes(Thread.currentThread().getId())*);

Or you can use JMH with args
*-prof gc.*
But please note it shows all the allocated bytes including temp objects,
not only the remaining.

If you know exactly which object contains your data, you can use *Java
Object Layout *( http://openjdk.java.net/projects/code-tools/jol/ ) which
show you everything even alignment. In this video (in Russian, but i know
it's not problem for you) you can see how to use it:
https://www.youtube.com/watch?v=r_bnfv-nlcs




2017-03-30 19:45 GMT+03:00 Dmitriy Setrakyan <dsetrak...@apache.org>:

> On Thu, Mar 30, 2017 at 9:30 AM, Vyacheslav Daradur <daradu...@gmail.com>
> wrote:
>
> > Dmitry, as I understand Ignite doesn't provide a possibility to show real
> > total size of objects in a IgniteCache.
> >
>
> Currently no, but the 2.0 release, which is fully off-heap, will provide a
> precise cache size.
>

Reply via email to