I would like to use Ignite Persistence but there is something I am not getting. My current understanding is that Ignite will always consume all the machine memory before the data on the disk will grow larger than the data in RAM. Let me explain:
With a machine with 128GB of memory, If I set the memory the region to 100GB then Ignite will also consume 100GB of RAM.
<bean class="org.apache.ignite.configuration.DataRegionConfiguration">
<property name="name" value="Default_Region"/>
<property name="initialSize" value="#{100 * 1024 * 1024 * 1024}"/>
</bean>
The problem is that I would like to say that I reserve 100GB out of 128 for Ignite and then the rest spill over to disk. But I would like to make sure I keep enough RAM available to start some ad hoc processes if need be.
If on the same 128GB machine I define a region with 300GB then ignite will consume all the memory available (80% of the machine I think) before the disk size is greater than the memory size but it means that I cannot keep more than 20% available for other processes.
<bean class="org.apache.ignite.configuration.DataRegionConfiguration">
<property name="name" value="Default_Region"/>
<property name="initialSize" value="#{300 * 1024 * 1024 * 1024}"/>
</bean>
Couple of questions:
Thanks a lot
Ignite with native persistence enabled is a database. All the data is on disk. Some percentage of the data is also in memory (hopefully 100% but not always).
The 80% thing is the default, what you get if you don't specify a data region. If you specify a size, that's what you get. So setting the data region size to 100Gb allows Ignite to use 100Gb of memory, and any data you store beyond that is only on disk. Don't set the data region size to be more than the amount of memory available or your in-memory database will suddenly be disk bound.
<bean class="org.apache.ignite.configuration.DataRegionConfiguration">
<property name="name" value="Default_Region"/>
<property name="initialSize" value="#{100 * 1024 * 1024 * 1024}"/>
<property name="maxSize" value="#{100 * 1024 * 1024 * 1024}"/>
</bean>
This is for off-heap storage. You'll also need to take into account Java heap space.