You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by jackluo923 <ja...@mail.utoronto.ca> on 2019/04/01 13:38:21 UTC

Use onheap and offheap memory at the same time recommend?

I am wondering if using onheap memory along with offheap memory + native
persistence is recommend to take advantage of element (entry) level LRU
eviction policy. With this particular configuration, how would the cache
work? 

i.e. Does entry first gets stored on onheap memory; and when onheap memory
is full, entries gets gets evicted and pushed to offheap memory; and when
offheap memory is full, the entry gets persisted to persistant storage?



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

Re: Use onheap and offheap memory at the same time recommend?

Posted by ibelyakov <ig...@gmail.com>.
Hello,

There are 2 types of eviction in Ignite:
1. Off-Heap eviction works when Native Persistence is turned off and
off-heap eviction policy is specified. 
In this case entries will be stored on the off-heap until eviction policy
limit is reached, after that entries will be removed from the off-heap
according to policy.
https://apacheignite.readme.io/docs/evictions#section-off-heap-memory
2. On-Heap eviction works when "onheapCacheEnabled" is turned on and on-heap
eviction policy is specified.
In this case entries will be stored on the off-heap similar to the previos
case, but additional copy will stored on the on-heap. If on-heap eviction
policy limit is reached, entries will be removed from the on-heap according
to policy.
https://apacheignite.readme.io/docs/evictions#section-on-heap-cache

More information regarding On-heap caching can be found here:
https://apacheignite.readme.io/docs/memory-configuration#section-on-heap-caching

In case you're using Native Persistence, there is a process similar to
eviction - called Page replacement, but it's not configurable.
For Native Persistence, if you have reached off-heap limit then entries will
be stored to persistence storage.
https://apacheignite.readme.io/docs/distributed-persistent-store

Regards,
Igor



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