You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Tejashwa Kumar Verma <te...@gmail.com> on 2017/12/20 14:05:58 UTC

Ignite 2.3 Swap Path configuration is causing issue

Hi All,

We are migrating from 1.9 to 2.3 and we are configuring Data regions for
Cache with '*swapPath*' configuration as below.

<?xml version="1.0" encoding="UTF-8"?> <property name=
"dataStorageConfiguration"> <bean class=
"org.apache.ignite.configuration.DataStorageConfiguration"> <property name=
"defaultDataRegionConfiguration"> <bean class=
"org.apache.ignite.configuration.DataRegionConfiguration"> <property name=
"name" value="5GB_SWAP_Region_Swapping" /> <!-- 100 MB initial size. --> <
property name="initialSize" value="#{100L * 1024 * 1024}" /> <!-- Setting
the size of the default region to 5GB. --> <property name="maxSize" value="#{5
* 1024L * 1024L * 1024L}" /> *<property name="swapPath" value="/opt/swap"
/>* </bean> </property> </bean> </property>

Now as per configs, first data (< = 5GB) should go in RAM and once it
starts spilling over maxSize 5GB then remaining data should go in SWAP.

*ISSUE:*
We are facing issue here, whenever we start data load with "*swapPath*"
property configuration, entire data is going to SWAP directly and its not
going to RAM and this behavior is not correct. Whereas if we are removing "
*swapPath*" property from configuration then data is going to RAM.

Please let me know if my configs are correct or anything else is required ?


Thanks & Regards
Tejas

Re: Ignite 2.3 Swap Path configuration is causing issue

Posted by Alexey Goncharuk <al...@gmail.com>.
Hi,

Just to reiterate and clarify the behavior. Region maxSize defines the
total maxSize of the region, you will get OOME if your data size exceeds
the maxSize. However, when using swap, you can set maxSize _bigger_ than
RAM size, in this case, the OS will take care of the swapping.

2017-12-21 11:57 GMT+03:00 Alexey Kukushkin <ku...@gmail.com>:

> You will get OutOfMemory error if data does not fit into data region.
> Configure an eviction policy or persistence to avoid that.
>

Re: Ignite 2.3 Swap Path configuration is causing issue

Posted by Alexey Kukushkin <ku...@gmail.com>.
You will get OutOfMemory error if data does not fit into data region.
Configure an eviction policy or persistence to avoid that.

Re: Ignite 2.3 Swap Path configuration is causing issue

Posted by Denis Magda <dm...@apache.org>.
Yes. Read more here: https://apacheignite.readme.io/docs/memory-configuration#section-data-regions <https://apacheignite.readme.io/docs/memory-configuration#section-data-regions>

—
Denis


> On Dec 20, 2017, at 8:24 PM, Tejashwa Kumar Verma <te...@gmail.com> wrote:
> 
> Oh thanks Alexey, So if we are using ignite V2.X without enabling persistence and if data is spilling over the MaxSize. Then where will that data go ?
> 
> On Thu, Dec 21, 2017 at 1:19 AM, Alexey Kukushkin <kukushkinalexey@gmail.com <ma...@gmail.com>> wrote:
> Swapping feature was removed in Ignite v.2 since native persistence was introduced. Use native persistence to "extend" memory.
> 


Re: Ignite 2.3 Swap Path configuration is causing issue

Posted by Tejashwa Kumar Verma <te...@gmail.com>.
Oh thanks Alexey, So if we are using ignite V2.X without enabling
persistence and if data is spilling over the MaxSize. Then where will that
data go ?

On Thu, Dec 21, 2017 at 1:19 AM, Alexey Kukushkin <kukushkinalexey@gmail.com
> wrote:

> Swapping feature was removed in Ignite v.2 since native persistence was
> introduced. Use native persistence to "extend" memory.
>

Re: Ignite 2.3 Swap Path configuration is causing issue

Posted by Alexey Kukushkin <ku...@gmail.com>.
Swapping feature was removed in Ignite v.2 since native persistence was
introduced. Use native persistence to "extend" memory.

Re: Ignite 2.3 Swap Path configuration is causing issue

Posted by Tejashwa Kumar Verma <te...@gmail.com>.
Hi Alexey,

Thanks for quick reply.
Since you are suggesting that SwapPath is not about swap files used by
operating systems to extend RAM.

Please suggest me the way in 2.3 to configure swapfiles to extend RAM


Thanks & Regards
Tejas

On 20 Dec 2017 9:29 pm, "Alexey Kukushkin" <ku...@gmail.com>
wrote:

> My understanding is specifying a swapPath makes data region allocated in a
> memory mapped file. Otherwise the data region is stored in off-heap RAM.
> swapPath is not about swap files used by operating systems to extend RAM.
>
> According to my understanding the behaviour you described is correct.
>

Re: Ignite 2.3 Swap Path configuration is causing issue

Posted by Alexey Kukushkin <ku...@gmail.com>.
My understanding is specifying a swapPath makes data region allocated in a
memory mapped file. Otherwise the data region is stored in off-heap RAM.
swapPath is not about swap files used by operating systems to extend RAM.

According to my understanding the behaviour you described is correct.