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/30 18:16:44 UTC

expiry policy

Hi All,

I understand that expiry policy applies to off heap cache along with the
persistent durable storage. Is there a way to apply different expiry policy
to cache and disk? I need to retain the data on disk a lot longer than I
can afford in cache.

thanks.

Re: expiry policy

Posted by akorensh <al...@gmail.com>.
Hi,
  Expiry policies are designed to set the lifetime of an entry. 
  If you configure your data region to have a small max size, and load more
data than the max size of the data region, then most of your entries will be
kept in persistent storage. 
 After configuring your data region, set your expiry policy to be as needed,
and your entries will be deleted when necessary. 

 see:
https://www.gridgain.com/docs/latest/developers-guide/memory-configuration/data-regions
 
https://ignite.apache.org/releases/latest/javadoc/org/apache/ignite/configuration/DataRegionConfiguration.html#setMaxSize-long-

 use the corresponding messages in the log to determine how much data is in
memory and what percent was committed on disk


Here everything is in memory because it is large enough to accommodate all
entries.
    ^-- Off-heap memory [used=30MB, free=99.17%, allocated=3447MB]
    ^--   default region [type=default, persistence=true, lazyAlloc=true,
      ...  initCfg=256MB, maxCfg=3247MB, usedRam=30MB, freeRam=99.07%,
allocRam=3247MB, allocTotal=29MB]
    ^-- Ignite persistence [used=29MB]

To understand what happens when Ignite hits the limits of a data region see
"page replacement" section here:
https://ignite.apache.org/docs/latest/memory-configuration/eviction-policies


Thanks, Alex



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