2004-06-01 07:23:42

by Anthony DiSante

[permalink] [raw]
Subject: swappiness ignored

In the "why swap at all" thread, there was mention of the
/proc/sys/vm/swappiness tunable, and some people suggested echoing a zero to
there if you want to minimize/disable swap usage, or echoing a 100 to
maximize swap usage, etc.

But on my 2.6.5 system, I can echo a zero to there, then cat it back to make
sure... then 30 seconds later cat it again, and it's been changed to
something else (50, 60, 80something).

Is this supposed to be a value that can be manually adjusted, as some have
claimed, or is it something the kernel manages automatically? I definitely
can't manually set it without having it overwritten shortly thereafter.

-Anthony
http://nodivisions.com/


2004-06-01 09:36:31

by Marc-Christian Petersen

[permalink] [raw]
Subject: Re: swappiness ignored

On Tuesday 01 June 2004 09:23, Anthony DiSante wrote:

Hi Anthony,

> In the "why swap at all" thread, there was mention of the
> /proc/sys/vm/swappiness tunable, and some people suggested echoing a zero
> to there if you want to minimize/disable swap usage, or echoing a 100 to
> maximize swap usage, etc.
> But on my 2.6.5 system, I can echo a zero to there, then cat it back to
> make sure... then 30 seconds later cat it again, and it's been changed to
> something else (50, 60, 80something).
> Is this supposed to be a value that can be manually adjusted, as some have
> claimed, or is it something the kernel manages automatically? I definitely
> can't manually set it without having it overwritten shortly thereafter.

I bet you have /proc/sys/vm/autoswappiness or the previous version of it
w/o /proc stuff.

ciao, Marc

2004-06-01 19:38:47

by Anthony DiSante

[permalink] [raw]
Subject: Re: swappiness ignored

Marc-Christian Petersen wrote:
>>In the "why swap at all" thread, there was mention of the
>>/proc/sys/vm/swappiness tunable, and some people suggested echoing a zero
>>to there if you want to minimize/disable swap usage, or echoing a 100 to
>>maximize swap usage, etc.
>>But on my 2.6.5 system, I can echo a zero to there, then cat it back to
>>make sure... then 30 seconds later cat it again, and it's been changed to
>>something else (50, 60, 80something).
>>Is this supposed to be a value that can be manually adjusted, as some have
>>claimed, or is it something the kernel manages automatically? I definitely
>>can't manually set it without having it overwritten shortly thereafter.
>
>
> I bet you have /proc/sys/vm/autoswappiness or the previous version of it
> w/o /proc stuff.

Ah, yes, I do, and it's set to one. So if I set that to zero, then the
kernel won't automatically adjust /proc/sys/vm/swappiness?

-Anthony
http://nodivisions.com/

2004-06-01 19:43:15

by Marc-Christian Petersen

[permalink] [raw]
Subject: Re: swappiness ignored

On Tuesday 01 June 2004 21:38, Anthony DiSante wrote:

Hi Anthony,

> > I bet you have /proc/sys/vm/autoswappiness or the previous version of it
> > w/o /proc stuff.

> Ah, yes, I do, and it's set to one. So if I set that to zero, then the
> kernel won't automatically adjust /proc/sys/vm/swappiness?

right :)

ciao, Marc

2004-06-02 19:54:50

by Bill Davidsen

[permalink] [raw]
Subject: Re: swappiness ignored

Marc-Christian Petersen wrote:
> On Tuesday 01 June 2004 09:23, Anthony DiSante wrote:
>
> Hi Anthony,
>
>
>>In the "why swap at all" thread, there was mention of the
>>/proc/sys/vm/swappiness tunable, and some people suggested echoing a zero
>>to there if you want to minimize/disable swap usage, or echoing a 100 to
>>maximize swap usage, etc.
>>But on my 2.6.5 system, I can echo a zero to there, then cat it back to
>>make sure... then 30 seconds later cat it again, and it's been changed to
>>something else (50, 60, 80something).
>>Is this supposed to be a value that can be manually adjusted, as some have
>>claimed, or is it something the kernel manages automatically? I definitely
>>can't manually set it without having it overwritten shortly thereafter.
>
>
> I bet you have /proc/sys/vm/autoswappiness or the previous version of it
> w/o /proc stuff.

What option do I need to enable so I can get this control (to disable
it)? I have sysctl enabled in 2.6.7-rc1 and no autoswappiness to be found.

--
-bill davidsen ([email protected])
"The secret to procrastination is to put things off until the
last possible moment - but no longer" -me

2004-06-02 23:33:28

by Con Kolivas

[permalink] [raw]
Subject: Re: swappiness ignored

On Thu, 3 Jun 2004 05:54, Bill Davidsen wrote:
> Marc-Christian Petersen wrote:
> > I bet you have /proc/sys/vm/autoswappiness or the previous version of it
> > w/o /proc stuff.
>
> What option do I need to enable so I can get this control (to disable
> it)? I have sysctl enabled in 2.6.7-rc1 and no autoswappiness to be found.

This only exists if you have it patched with my autoregulated swappiness
patch.

http://ck.kolivas.org/patches/2.6/2.6.7-rc2/patch-2.6.7-rc2-am11


The mainline kernel has a static value for swappiness you can set any time.

echo 60 > /proc/sys/vm/swappiness

Con