All of lore.kernel.org
 help / color / mirror / Atom feed
* tmem frontswap without swap file
@ 2014-02-20  5:52 Vasiliy Tolstov
  2014-02-21  4:35 ` Vasiliy Tolstov
  0 siblings, 1 reply; 7+ messages in thread
From: Vasiliy Tolstov @ 2014-02-20  5:52 UTC (permalink / raw)
  To: xen-devel

Hello. I have some problems with swap files in domU - i have ssd disks
that caches all io and if user use swap, ssd may fail very often.
Is that possible to use tmem frontswap without swap file at all? And
transparently push swap pages to tmem?

-- 
Vasiliy Tolstov,
e-mail: v.tolstov@selfip.ru
jabber: vase@selfip.ru

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: tmem frontswap without swap file
  2014-02-20  5:52 tmem frontswap without swap file Vasiliy Tolstov
@ 2014-02-21  4:35 ` Vasiliy Tolstov
  2014-02-24  3:32   ` Bob Liu
  0 siblings, 1 reply; 7+ messages in thread
From: Vasiliy Tolstov @ 2014-02-21  4:35 UTC (permalink / raw)
  To: Vasiliy Tolstov; +Cc: xen-devel

2014-02-20 9:52 GMT+04:00 Vasiliy Tolstov <v.tolstov@selfip.ru>:
> Hello. I have some problems with swap files in domU - i have ssd disks
> that caches all io and if user use swap, ssd may fail very often.
> Is that possible to use tmem frontswap without swap file at all? And
> transparently push swap pages to tmem?


Okay as i see it can;'t be possible.
Another question - is that possible to reserve tmem to domains at specific size?
For example i need to get 20Gb for one domain and 10Gb for another.
But if second domain very hungry it can't
eaten all memory

-- 
Vasiliy Tolstov,
e-mail: v.tolstov@selfip.ru
jabber: vase@selfip.ru

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: tmem frontswap without swap file
  2014-02-21  4:35 ` Vasiliy Tolstov
@ 2014-02-24  3:32   ` Bob Liu
  2014-02-24 11:01     ` Vasiliy Tolstov
  0 siblings, 1 reply; 7+ messages in thread
From: Bob Liu @ 2014-02-24  3:32 UTC (permalink / raw)
  To: Vasiliy Tolstov; +Cc: xen-devel



On 02/21/2014 12:35 PM, Vasiliy Tolstov wrote:
> 2014-02-20 9:52 GMT+04:00 Vasiliy Tolstov <v.tolstov@selfip.ru>:
>> Hello. I have some problems with swap files in domU - i have ssd disks
>> that caches all io and if user use swap, ssd may fail very often.
>> Is that possible to use tmem frontswap without swap file at all? And
>> transparently push swap pages to tmem?
> 
> 
> Okay as i see it can;'t be possible.
> Another question - is that possible to reserve tmem to domains at specific size?
> For example i need to get 20Gb for one domain and 10Gb for another.
> But if second domain very hungry it can't
> eaten all memory
> 

Two types of page can be stored in tmem: persistent_page and ephemeral_page.

Persistent pages are swapped-out pages, whose date can't be dropped by
tmem. The rule for persistent pages is:
'current_domain_pages +  persistent_pages have to smaller than
domain->max_pages'.

Ephemeral pages are clean pagecache pages, those pages have a copy in
disk already.
The amount number of ephemeral pages are not limited, but XEN host will
reclaim those pages if under memory pressure.
There is a tmem parameter 'weight' which can be used to control how many
ephemeral_pages should be reclaimed between domains.

-- 
Regards,
-Bob

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: tmem frontswap without swap file
  2014-02-24  3:32   ` Bob Liu
@ 2014-02-24 11:01     ` Vasiliy Tolstov
  2014-02-25  4:52       ` Bob Liu
  0 siblings, 1 reply; 7+ messages in thread
From: Vasiliy Tolstov @ 2014-02-24 11:01 UTC (permalink / raw)
  To: Bob Liu; +Cc: xen-devel

2014-02-24 7:32 GMT+04:00 Bob Liu <bob.liu@oracle.com>:
> Two types of page can be stored in tmem: persistent_page and ephemeral_page.
>
> Persistent pages are swapped-out pages, whose date can't be dropped by
> tmem. The rule for persistent pages is:
> 'current_domain_pages +  persistent_pages have to smaller than
> domain->max_pages'.
>
> Ephemeral pages are clean pagecache pages, those pages have a copy in
> disk already.
> The amount number of ephemeral pages are not limited, but XEN host will
> reclaim those pages if under memory pressure.
> There is a tmem parameter 'weight' which can be used to control how many
> ephemeral_pages should be reclaimed between domains.


Very good, thanks for answers! What minimal kernel versions recommends
for frontswap/cleancache in domU (dom0 xen 4.3.2)

-- 
Vasiliy Tolstov,
e-mail: v.tolstov@selfip.ru
jabber: vase@selfip.ru

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: tmem frontswap without swap file
  2014-02-24 11:01     ` Vasiliy Tolstov
@ 2014-02-25  4:52       ` Bob Liu
  2014-02-25  5:05         ` Vasiliy Tolstov
  0 siblings, 1 reply; 7+ messages in thread
From: Bob Liu @ 2014-02-25  4:52 UTC (permalink / raw)
  To: Vasiliy Tolstov; +Cc: xen-devel


On 02/24/2014 07:01 PM, Vasiliy Tolstov wrote:
> 2014-02-24 7:32 GMT+04:00 Bob Liu <bob.liu@oracle.com>:
>> Two types of page can be stored in tmem: persistent_page and ephemeral_page.
>>
>> Persistent pages are swapped-out pages, whose date can't be dropped by
>> tmem. The rule for persistent pages is:
>> 'current_domain_pages +  persistent_pages have to smaller than
>> domain->max_pages'.
>>
>> Ephemeral pages are clean pagecache pages, those pages have a copy in
>> disk already.
>> The amount number of ephemeral pages are not limited, but XEN host will
>> reclaim those pages if under memory pressure.
>> There is a tmem parameter 'weight' which can be used to control how many
>> ephemeral_pages should be reclaimed between domains.
> 
> 
> Very good, thanks for answers! What minimal kernel versions recommends
> for frontswap/cleancache in domU (dom0 xen 4.3.2)
> 

Any version started from v3.5 should be okay, I'd recommend versions
after v3.10 since there were hardly no commits since that version.

And I suggest you apply this patch also(which haven't been merged to
linus' git tree yet)
https://git.kernel.org/cgit/linux/kernel/git/konrad/xen.git/commit/?h=stable/for-linus-3.14&id=bc1b0df59e3fc4573f92bc1aab9652047a0aeaa7

-- 
Regards,
-Bob

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: tmem frontswap without swap file
  2014-02-25  4:52       ` Bob Liu
@ 2014-02-25  5:05         ` Vasiliy Tolstov
  2014-02-25  5:26           ` Bob Liu
  0 siblings, 1 reply; 7+ messages in thread
From: Vasiliy Tolstov @ 2014-02-25  5:05 UTC (permalink / raw)
  To: Bob Liu; +Cc: xen-devel

2014-02-25 8:52 GMT+04:00 Bob Liu <bob.liu@oracle.com>:
> Any version started from v3.5 should be okay, I'd recommend versions
> after v3.10 since there were hardly no commits since that version.
>

Okay. Big thanks!

> And I suggest you apply this patch also(which haven't been merged to
> linus' git tree yet)
> https://git.kernel.org/cgit/linux/kernel/git/konrad/xen.git/commit/?h=stable/for-linus-3.14&id=bc1b0df59e3fc4573f92bc1aab9652047a0aeaa7

I don't need that - i'm balloon from userspace because in userspace i
have more control how change speed of memory ballooning. And not all
kernel versions have xen-selfballoon.


-- 
Vasiliy Tolstov,
e-mail: v.tolstov@selfip.ru
jabber: vase@selfip.ru

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: tmem frontswap without swap file
  2014-02-25  5:05         ` Vasiliy Tolstov
@ 2014-02-25  5:26           ` Bob Liu
  0 siblings, 0 replies; 7+ messages in thread
From: Bob Liu @ 2014-02-25  5:26 UTC (permalink / raw)
  To: Vasiliy Tolstov; +Cc: xen-devel


On 02/25/2014 01:05 PM, Vasiliy Tolstov wrote:
> 2014-02-25 8:52 GMT+04:00 Bob Liu <bob.liu@oracle.com>:
>> Any version started from v3.5 should be okay, I'd recommend versions
>> after v3.10 since there were hardly no commits since that version.
>>
> 
> Okay. Big thanks!
> 
>> And I suggest you apply this patch also(which haven't been merged to
>> linus' git tree yet)
>> https://git.kernel.org/cgit/linux/kernel/git/konrad/xen.git/commit/?h=stable/for-linus-3.14&id=bc1b0df59e3fc4573f92bc1aab9652047a0aeaa7
> 
> I don't need that - i'm balloon from userspace because in userspace i
> have more control how change speed of memory ballooning. And not all
> kernel versions have xen-selfballoon.
> 

I see, welcome any feedback!

-- 
Regards,
-Bob

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-02-25  5:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-20  5:52 tmem frontswap without swap file Vasiliy Tolstov
2014-02-21  4:35 ` Vasiliy Tolstov
2014-02-24  3:32   ` Bob Liu
2014-02-24 11:01     ` Vasiliy Tolstov
2014-02-25  4:52       ` Bob Liu
2014-02-25  5:05         ` Vasiliy Tolstov
2014-02-25  5:26           ` Bob Liu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.