lkml.org 
[lkml]   [2012]   [Mar]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRE: [RFC][PATCH] avoid swapping out with swappiness==0
Hello Kosaki-san,

On 03/07/2012 01:18 PM, Satoru Moriya wrote:
> On 03/07/2012 12:19 PM, KOSAKI Motohiro wrote:
>> Thank you. I brought back to memory it. Unfortunately DB folks are
>> still mainly using RHEL5 generation distros. At that time,
>> swapiness=0 doesn't mean disabling swap.
>>
>> They want, "don't swap as far as kernel has any file cache page". but
>> linux don't have such feature. then they used swappiness for emulate
>> it. So, I think this patch clearly make userland harm. Because of, we
>> don't have an alternative way.

As I wrote in the previous mail(see below), with this patch
the kernel begins to swap out when the sum of free pages and
filebacked pages reduces less than watermark_high.

So the kernel reclaims pages like following.

nr_free + nr_filebacked >= watermark_high: reclaim only filebacked pages
nr_free + nr_filebacked < watermark_high: reclaim only anonymous pages

Do you think this behavior satisfies DB users' requirement?


> If they expect the behavior that "don't swap as far as kernel has any
> file cache page", this patch definitely helps them because if we set
> swappiness==0, kernel does not swap out
> *until* nr_free + nr_filebacked < high watermark in the zone.
> It means kernel begins to swap out when nr_free + nr_filebacked
> becomes less than high watermark.
>
> But, yes, this patch actually changes the behavior with swappiness==0
> and so it may make userland harm.
>
> How about introducing new value e.g -1 to avoid swap and maintain
> compatibility?

Regards,
Satoru


\
 
 \ /
  Last update: 2012-03-31 00:47    [W:1.345 / U:0.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site