The vm_swappiness dial in 2.6 was never quite the right setting without me constantly changing it depending on the workload. If I was copying large files or encoding video it was best at 0. If I was using lots of applications it was best much higher. Furthermore it depended on the amount of ram in the machine I was using. This patch was done just for fun a while back but it turned out to be quite effectual so I thought I'd make it available for the wider community to play with. Do whatever you like with it. This patch autoregulates the vm_swappiness dial in 2.6 by making it equal to the percentage of physical ram consumed by application pages. This has the effect of preventing applications from being swapped out if the ram is filling up with cached data. Conversely, if many applications are in ram the swappiness increases which means the application currently in use gets to stay in physical ram while other less used applications are swapped out. For desktop enthusiasts this means if you are copying large files around like ISO images or leave your machine unattended for a while it will not swap out your applications. Conversely if the machine has a lot of applications currently loaded it will give the currently running applications preference and swap out the less used ones. The performance effect on larger boxes seems to be either unchanged or slight improvement (1%) in database benchmarks. The value in vm_swappiness is updated only when the vm is under pressure to swap and you can check the last vm_swappiness value under pressure by cat /proc/sys/vm/swappiness Manually setting the swappiness with this patch in situ has no effect. This patch has been heavily tested without noticable harm. Note I am not sure of the best way to do this so it may look rather crude. Patch against 2.6.0-test8 Con