You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by narges saleh <sn...@gmail.com> on 2020/11/16 12:54:24 UTC

Caches, Regions, Expiry, Eviction

Hi All,

I need confirmation for my understanding of some basic concepts.
These are my understanding. Please confirm.
1) Regions are not applicable to on heap caches. I'd use JVM -Xms and -Xmx
to set the limits, while with off heap caches, I'd use regions  with
initial/max size set.
2) When I define regions with persistence enabled, I'd define expiryPolicy,
not evictionPolicy.
3) With on heap caches, I'd define the evictionPolicy directly applied to
the cache.

thanks

Re: Caches, Regions, Expiry, Eviction

Posted by narges saleh <sn...@gmail.com>.
Thanks Ilya, for the explanation.

So, to recap,
data always resides in off heap, but it can be configured to reside to on
heap as well.
You define eviction policy on regions to evict the data from on heap, but
it won't affect the off heap.
You define expiry policy at cache level to remove data from off heap.

On Mon, Nov 16, 2020 at 7:04 AM Ilya Kasnacheev <il...@gmail.com>
wrote:

> Hello!
>
> 1. There's no such thing as pure on-heap cache. On-heap is an extra option
> for a cache, which is always off-heap. So you need to set both.
> 2. Eviction policy is applicable to on-heap part of a cache only. Expiry
> policy will remove data from both off-heap and PDS. There's also page
> eviction which changes its meaning when you add persistence.
> 3. Yes, but it will not remove data from off-heap so it will still be in
> the cache.
>
> Regards,
> --
> Ilya Kasnacheev
>
>
> пн, 16 нояб. 2020 г. в 15:55, narges saleh <sn...@gmail.com>:
>
>> Hi All,
>>
>> I need confirmation for my understanding of some basic concepts.
>> These are my understanding. Please confirm.
>> 1) Regions are not applicable to on heap caches. I'd use JVM -Xms and
>> -Xmx to set the limits, while with off heap caches, I'd use regions  with
>> initial/max size set.
>> 2) When I define regions with persistence enabled, I'd define
>> expiryPolicy, not evictionPolicy.
>> 3) With on heap caches, I'd define the evictionPolicy directly applied to
>> the cache.
>>
>> thanks
>>
>>
>>

Re: Caches, Regions, Expiry, Eviction

Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!

1. There's no such thing as pure on-heap cache. On-heap is an extra option
for a cache, which is always off-heap. So you need to set both.
2. Eviction policy is applicable to on-heap part of a cache only. Expiry
policy will remove data from both off-heap and PDS. There's also page
eviction which changes its meaning when you add persistence.
3. Yes, but it will not remove data from off-heap so it will still be in
the cache.

Regards,
-- 
Ilya Kasnacheev


пн, 16 нояб. 2020 г. в 15:55, narges saleh <sn...@gmail.com>:

> Hi All,
>
> I need confirmation for my understanding of some basic concepts.
> These are my understanding. Please confirm.
> 1) Regions are not applicable to on heap caches. I'd use JVM -Xms and
> -Xmx to set the limits, while with off heap caches, I'd use regions  with
> initial/max size set.
> 2) When I define regions with persistence enabled, I'd define
> expiryPolicy, not evictionPolicy.
> 3) With on heap caches, I'd define the evictionPolicy directly applied to
> the cache.
>
> thanks
>
>
>