You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by rushi_rashi <ru...@gmail.com> on 2017/05/17 12:47:50 UTC

Re: Understanding Swap Space feature-- how it works?

Hi,
I have question related to swap memory.
If we have set setSwapEnabled to true, 
a. When will be the data is written to disc?
b. If by default data is written to disc only when free space is not
available in RAM, then can we limit the usage of RAM, lets say write to disc
when 80% of RAM is used. Although eviction policy writes data to off heap
memory but not to disc. 



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Understanding-Swap-Space-feature-how-it-works-tp10859p12968.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Understanding Swap Space feature-- how it works?

Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!

As far as my understanding goes, you do not need to do anything special to
get data off swap. You can just access any data in the cache, whether
swapped out or not.

I'm not sure how it would interact with eviction.

Regards,
-- 
Ilya Kasnacheev


ср, 24 мар. 2021 г. в 10:26, martinlundaskoe <ma...@gmail.com>:

> Hi Valentin
>
> TL/DR; How is data evicted from swap then?
>
> I know this is an old issue, but I am also trying to understand the swap
> feature.
>
> This may be outdated by now due to the addition of Native Persistence, but
> I
> have a use case where having swap instead of native persistence would be
> ideal.
>
> I first thought that the off-heap storage was defined per dataregion, and
> the data retained in RAM would be limited by the XX:MaxDirectMemorySize,
> the
> rest would be written to swap.
>
> Now I al really confused, so now my question is now, how to I get the data
> off swap?
> I don't see anything related to eviction of data from the cache that was
> written to swap... plus does it even make sense to have evicted data in
> swap?
>
>
> vkulichenko wrote
> > Basically, swap space is another storage layer. You have on-heap,
> off-heap
> > and then swap. So in case of on-heap mode only entry will be written in
> > swap when it's evicted from cache due to eviction policy. With off-heap
> > enabled it will be written to swap when it's evicted from there due to
> > off-heap memory limit.
>
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>

Re: Understanding Swap Space feature-- how it works?

Posted by martinlundaskoe <ma...@gmail.com>.
Hi Valentin

TL/DR; How is data evicted from swap then?

I know this is an old issue, but I am also trying to understand the swap
feature.

This may be outdated by now due to the addition of Native Persistence, but I
have a use case where having swap instead of native persistence would be
ideal.

I first thought that the off-heap storage was defined per dataregion, and
the data retained in RAM would be limited by the XX:MaxDirectMemorySize, the
rest would be written to swap.

Now I al really confused, so now my question is now, how to I get the data
off swap?
I don't see anything related to eviction of data from the cache that was
written to swap... plus does it even make sense to have evicted data in
swap?


vkulichenko wrote
> Basically, swap space is another storage layer. You have on-heap, off-heap
> and then swap. So in case of on-heap mode only entry will be written in
> swap when it's evicted from cache due to eviction policy. With off-heap
> enabled it will be written to swap when it's evicted from there due to
> off-heap memory limit.





--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Understanding Swap Space feature-- how it works?

Posted by vkulichenko <va...@gmail.com>.
Basically, swap space is another storage layer. You have on-heap, off-heap
and then swap. So in case of on-heap mode only entry will be written in swap
when it's evicted from cache due to eviction policy. With off-heap enabled
it will be written to swap when it's evicted from there due to off-heap
memory limit.

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Understanding-Swap-Space-feature-how-it-works-tp10859p13033.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.