You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Victor <vi...@gmail.com> on 2020/07/22 04:06:15 UTC

Checking dataregion limits

Hi,

What is the best way to check for data region limits. Currently i am using
below mbeans attributes to monitor this,

1. CacheClusterMetricsMXBeanImpl / CacheLocalMetricsMXBeanImpl
Size - provides the total entries.

2. DataRegionMetricsMXBeanImpl
OffHeapSize - Shows close to the max size i have set for the cache. Not
exact though.
TotalAllocatedSize - Seems to increase as data is added to the cache.

Few queries,
1. Why does max size not show what i exactly set. E.g. if i set the size as
20 mb (i.e. 20 * 1024 * 1024 = 20971520), but the value for OffHeapSize is
19922944. So why not exact?
2. The Initial size under the same mbean show simply 19, where as i set it
to 19 mb (in bytes). Any idea why is that?
3. I expected "OffheapUsedSize" to be incremented everytime i add data to
this cache till it hits the max Size. However, it always stays at 0. The
only value increments is "TotalAllocatedSize". Is that the right attribute
to check for data size increments or should other attributes be checked?
4. With no data yet, "TotalAllocatedSize" still shows some amount of
allocation. Like in the above case of max size of 20 mb, i could see
TotalAllocatedSize already at 8 mb, even before data was added to the cache.
5. Finally if "TotalAllocatedSize" is indeed the attribute to track the size
increment, i should expect eviction to kick in when its value reaches 90% of
the max size. Is this understanding correct?

I'll run some more tests.

Victor

I'll tr




--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Checking dataregion limits

Posted by Victor <vi...@gmail.com>.
Correction, max size is indeed in MB, 'offHeapSize' is in bytes, which maps
to max size. I was looking for similar attribute for initial size in bytes.
But i didn't find one.

That is ok i guess. MB value works too.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Checking dataregion limits

Posted by Victor <vi...@gmail.com>.
Thanks Evgenii, this helps get some perspective.

It's confusing with maxSize being shown in bytes and the initialSize being
shown in MB.

Enabling metrics, does it entail any performance drop or can it be enabled
in production as well. I'll run my tests anyway. 



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Checking dataregion limits

Posted by Evgenii Zhuravlev <e....@gmail.com>.
Hi,

>What is the best way to check for data region limits.

*How about DataRegionMetricsMXBeanImpl.getMaxSize ?*

1. Why does max size not show what i exactly set. E.g. if i set the size as
20 mb (i.e. 20 * 1024 * 1024 = 20971520), but the value for OffHeapSize is
19922944. So why not exact?

*I think it might be an overhead for metadata information*

2. The Initial size under the same mbean show simply 19, where as i set it
to 19 mb (in bytes). Any idea why is that?

*Because this metrics show it in megabytes:dataRegCfg.getInitialSize()
/ (1024 * 1024)*

3. I expected "OffheapUsedSize" to be incremented everytime i add data to
this cache till it hits the max Size. However, it always stays at 0. The
only value increments is "TotalAllocatedSize". Is that the right attribute
to check for data size increments or should other attributes be checked?

*Are you sure that you have metrics enabled for this DataRegion?*

4. With no data yet, "TotalAllocatedSize" still shows some amount of
allocation. Like in the above case of max size of 20 mb, i could see
TotalAllocatedSize already at 8 mb, even before data was added to the cache.

*Ignite preallocates data by chunks.*

5. Finally if "TotalAllocatedSize" is indeed the attribute to track the size
increment, i should expect eviction to kick in when its value reaches 90% of
the max size. Is this understanding correct?

*Well, not really. If you have configured Eviction Policy, then you
can also configure it there, but TotalAllocatedSize won't be reduced
after the eviction, it can only grow. *


*Best Regards,*

*Evgenii*


вт, 21 июл. 2020 г. в 21:06, Victor <vi...@gmail.com>:

> Hi,
>
> What is the best way to check for data region limits. Currently i am using
> below mbeans attributes to monitor this,
>
> 1. CacheClusterMetricsMXBeanImpl / CacheLocalMetricsMXBeanImpl
> Size - provides the total entries.
>
> 2. DataRegionMetricsMXBeanImpl
> OffHeapSize - Shows close to the max size i have set for the cache. Not
> exact though.
> TotalAllocatedSize - Seems to increase as data is added to the cache.
>
> Few queries,
> 1. Why does max size not show what i exactly set. E.g. if i set the size as
> 20 mb (i.e. 20 * 1024 * 1024 = 20971520), but the value for OffHeapSize is
> 19922944. So why not exact?
> 2. The Initial size under the same mbean show simply 19, where as i set it
> to 19 mb (in bytes). Any idea why is that?
> 3. I expected "OffheapUsedSize" to be incremented everytime i add data to
> this cache till it hits the max Size. However, it always stays at 0. The
> only value increments is "TotalAllocatedSize". Is that the right attribute
> to check for data size increments or should other attributes be checked?
> 4. With no data yet, "TotalAllocatedSize" still shows some amount of
> allocation. Like in the above case of max size of 20 mb, i could see
> TotalAllocatedSize already at 8 mb, even before data was added to the
> cache.
> 5. Finally if "TotalAllocatedSize" is indeed the attribute to track the
> size
> increment, i should expect eviction to kick in when its value reaches 90%
> of
> the max size. Is this understanding correct?
>
> I'll run some more tests.
>
> Victor
>
> I'll tr
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>