On Sep 7, 2007, at 11:40 AM, Mumia W.. wrote:

On 09/07/2007 11:58 AM, David Brodbeck wrote:
Also, Linux is very aggressive about swapping out idle pages. (Some would even say too aggressive.) Even if you have what you think is plenty of RAM, it's quite likely Linux will swap out some stuff in order to make more room for the disk cache.

Is there a way to disable this aggressive swapping?

In 2.6.x kernels, you can write a number from 0 to 100 onto /proc/sys/ vm/swappiness. The higher the number, the more aggressively the kernel will swap. The default appears to be 60. Keep in mind that there's a balancing act here -- if you set this to a low number, you'll get less swapping, but you'll also have less disk cache. There's a good summary of the arguments for and against tweaking it here:
http://kerneltrap.org/node/3000

2.4.x didn't have any way to tune this. But the virtual memory system in 2.4.x has so many unpleasant behaviors, anyway, that I'd really suggest upgrading if you're experiencing problems in this area.



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to