Use onheap and offheap memory at the same time recommend?

classic Classic list List threaded Threaded
2 messages Options
jackluo923 jackluo923
Reply | Threaded
Open this post in threaded view
|

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/
ibelyakov ibelyakov
Reply | Threaded
Open this post in threaded view
|

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

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/