Lokesh
Lokesh

Reputation: 7940

Apache Ignite: Off heap Eviction Vs Cache Eviction policy

I am currently running into Out of memory with my data region and i am trying to understand storage and eviction policy for ignite cache :

Out of memory in data region [name=default, initSize=256.0 MiB, maxSize=8.0 GiB, persistenceEnabled=false]

As i understand a non persistent data region is stored in Off heap memory so efectively "xMX" param has no impact on its size. So for my data region storage my system should have sufficient memory.

However the caches which are being stored in data region are having eviction policy of their own. So i am not very clear, when will data region eviction policy trigger? Will data region eviction policy trigger if cache eviction policy is not able to create sufficient space?

Upvotes: 1

Views: 183

Answers (1)

Stephen Darlington
Stephen Darlington

Reputation: 52565

The cache level eviction policies are for an on-heap cache.

If you want to evict from the off-heap storage, you need to configure at the data region level. For example:

            <property name="dataRegionConfigurations">
                <list>
                    <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
                        <property name="name" value="40MB_Region_Eviction"/>
                        <property name="initialSize" value="#{20 * 1024 * 1024}"/>
                        <property name="maxSize" value="#{40 * 1024 * 1024}"/>
                        <property name="pageEvictionMode" value="RANDOM_2_LRU"/>
                    </bean>

Upvotes: 2

Related Questions