Search code examples
ignite

Does maxSize in Apache Ignite DataRegionConfiguration apply to regions with native persistence?


The javadocs for the maxSize property in Apache Ignite's DataRegionConfiguration say the following:

Maximum memory region size defined by this data region. If the whole data can not fit into the memory region an out of memory exception will be thrown.

How does this apply with native persistence turned on? Does the maxSize property only define how much of the data region is cached in memory at once? And will the out of memory exception not be thrown if the data can't fit into the memory region (which is the whole point of native persistence...). Should the java doc actually say something like this:

Maximum memory region size defined by this data region. If the whole data can not fit into the memory region an out of memory exception will be thrown, unless persistence is enabled.


Solution

  • The maxSize property limits the maximum size of the off-heap memory allocated for the data region. While the maximum size of the allocated disk space is not limited.

    In case the off-heap memory is full then page replacement will be applied, which replaces pages in the memory with pages loaded from the disk according to the configured page replacement mode.

    You can find additional details regarding it here.