Swappiness default
Rashkae
ubuntu at tigershaunt.com
Mon May 23 14:56:39 UTC 2011
On 05/23/2011 10:51 AM, Hakan Koseoglu wrote:
>
> Setting the swappiness to 0 delays any swaps until you've run out of
> RAM completely and only then it starts writing to disk. As a result if
> you have a lot of RAM, it's preferrable. On the other hand, when you
> run out of memory, it will start heavily swapping immediately (depends
> on how many processes want to grab the lot).
>
> If you set it to a high number, the system will housekeep very often
> and you will experience slow downs when you really don't need any (I
> have 2GB free, why are you swapping 1GB, oh the wise kernel?)...
>
Because using ram to cache frequently accessed files (such as mem-mapped
libraries, as an example) is much better for overall system performance
than holding little used pages of application ram. Course, if you have
objective benchmarks that contradict this...... (yeah, I know, I'm not
providing any either. But without proof otherwise, I'm going with the
opinion of those who actually performance test the kernel with
measurable metrics)
You should also keep in mind that a page is swap can also be in Ram at
the same time. Being in swap only means that that ram can be quickly
paged out instantly at need. Again, overall better system speed is
achieved.
More information about the ubuntu-users
mailing list