Swappiness default
Rashkae
ubuntu at tigershaunt.com
Mon May 23 14:46:27 UTC 2011
On 05/23/2011 10:34 AM, Hakan Koseoglu wrote:
> On 23 May 2011 15:19, Colin Law<clanlaw at googlemail.com> wrote:
>>> That's community documentation. I'd ask the person who wrote it.
>> Do you mean ask him why the default is 60, or why he thinks that 10 is
>> better? Â If the latter then does the fact that the default is 60 imply
>> that the 'official' view is that for a typical desktop a value of 60
>> is optimum.
> If you ask me, I'd say as long as you have enough RAM, setting it to 0
> is the best. If you ask others, you'll get a completely different
> answer (http://kerneltrap.org/node/3000?page=1).
>
> I have to say I'm sure Mr. Morton knows better than I do but 0 works
> fine for me, esp. on a laptop with relatively low disk performance.
Actually, if you have enough RAM, leaving at default 60 would be best,
as low disk performance would be greatly helped by the extra cache. The
downside to aggressive swappiness, however, is the increased chance that
the OS will choose wrong what to cache and your system is starved for
memory and getting stuck in "swap storms". (Where you are swapping out
active memory to make room for swapping other stuff in, very very
slow.) If you find yourself in a situation where your system is slow
due to swapping (can be seen with memstat or gkrellm, among others) then
you can experiment with reducing swappiness to find a better balance. I
don't really know why anyone would want to go straight down to 10 and
consider that a better default for desktop workload, however. A $20
investment in RAM would go much further.
More information about the ubuntu-users
mailing list