You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by the_palakkaran <ji...@suntecsbs.com> on 2018/06/19 05:30:16 UTC

Re: Quick questions on Evictions

Hi,

DataPageEvictionMode is deprecated now, right? What should I do to evict my
off heap entries? Also, can I limit off heap memory usage?



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

Re: Quick questions on Evictions

Posted by Andrey Mashenkov <an...@gmail.com>.
Yes, you are right.

On Wed, Jun 20, 2018 at 4:13 PM the_palakkaran <ji...@suntecsbs.com> wrote:

> So to conclude, if I have enabled on heap storage for cache(using
> cache.setOnHeapEnabled(true),
> then :
> 1. Still data will be stored off heap, but will be loaded to heap. To
> escape
> out of memory error, I have to set eviction policies.
> 2. Off heap entries will be written to disk based on data page eviction
> mode
> enabled on data region. This size is limited based on initial and maximum
> size of data region.
>
> I hope this is how it works. Big thanks !!
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>


-- 
Best regards,
Andrey V. Mashenkov

Re: Quick questions on Evictions

Posted by the_palakkaran <ji...@suntecsbs.com>.
So to conclude, if I have enabled on heap storage for cache(using
cache.setOnHeapEnabled(true),
then :
1. Still data will be stored off heap, but will be loaded to heap. To escape
out of memory error, I have to set eviction policies.
2. Off heap entries will be written to disk based on data page eviction mode
enabled on data region. This size is limited based on initial and maximum
size of data region.

I hope this is how it works. Big thanks !!



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

Re: Quick questions on Evictions

Posted by Andrey Mashenkov <an...@gmail.com>.
DataRegionConfiguration.setMaxSize() should be used to limit offheap memory
usage.

On Tue, Jun 19, 2018 at 2:35 PM the_palakkaran <ji...@suntecsbs.com> wrote:

> So how do I limit cache size if ignite native persistence is enabled using
> dataRegionCfg.setPersistenceEnabled(true)? I don't want it to keep a lot of
> data in memory and others may be kept on disk. That is the requirement.
>
> Also, I do have on heap cache enabled. But I read in many threads that
> Ignite stores everything off heap and only references may be kept in java
> heap. So how do I limit off heap cache usage? I mean I don't want to it to
> use more than a particular amount of off heap memory?
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>


-- 
Best regards,
Andrey V. Mashenkov

Re: Quick questions on Evictions

Posted by the_palakkaran <ji...@suntecsbs.com>.
So how do I limit cache size if ignite native persistence is enabled using
dataRegionCfg.setPersistenceEnabled(true)? I don't want it to keep a lot of
data in memory and others may be kept on disk. That is the requirement.

Also, I do have on heap cache enabled. But I read in many threads that
Ignite stores everything off heap and only references may be kept in java
heap. So how do I limit off heap cache usage? I mean I don't want to it to
use more than a particular amount of off heap memory?



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

Re: Quick questions on Evictions

Posted by Andrey Mashenkov <an...@gmail.com>.
Hi,

DataPageEvictionMode is about algorithm of choosing page to be replaced.
EvictionPolicy is what you are looking for. E.g. FifoEvictionPolicy or
LruEvictionPolicy.

It looks like EvictionPolicies can't be used with persistence as all of
them uses non-persistent structures to track cache entries.



On Tue, Jun 19, 2018 at 8:30 AM the_palakkaran <ji...@suntecsbs.com> wrote:

> Hi,
>
> DataPageEvictionMode is deprecated now, right? What should I do to evict my
> off heap entries? Also, can I limit off heap memory usage?
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>


-- 
Best regards,
Andrey V. Mashenkov