0
votes

We have ignite cluster of 3 instances,so How can we give Fixed memory in Apache ignite for every ignite instance. (OS:Ubuntu 14.05 Ignite verion:2.4)

1

1 Answers

3
votes

If you are going to set heap memory size then use next JVM options like

-Xms512m -Xmx512m

Off-Heap memory allows your cache to overcome lengthy JVM Garbage Collection (GC) pauses when working with large heap sizes by caching data outside of main Java Heap space, but still in RAM.

By default, Ignite nodes consume up to 20% of the RAM available locally. Change this value you can as next:

<!-- Redefining maximum memory size for the cluster node usage. -->  
<property name="dataStorageConfiguration">
  <bean class="org.apache.ignite.configuration.DataStorageConfiguration">
    <!-- Redefining the default region's settings -->
    <property name="defaultDataRegionConfiguration">
      <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
        <property name="name" value="Default_Region"/>
        <!-- Setting the size of the default region to 4GB. -->
        <property name="maxSize" value="#{4L * 1024 * 1024 * 1024}"/>
      </bean>
    </property>
  </bean>
</property>

On-Heap Caching provides the possibility to use Java heap. You can enable on-heap caching by setting org.apache.ignite.configuration.CacheConfiguration.setOnheapCacheEnabled(...) to true.

You can read more here https://apacheignite.readme.io/docs/memory-configuration

Because the size of heap isn't unlimited you could use eviction policies:

https://apacheignite.readme.io/docs/evictions