Performance shock (BS)
Niran Babalola
iamniran at gmail.com
Sun Apr 24 23:55:43 UTC 2005
On 4/24/05, Vincent Trouilliez <vincent.trouilliez at modulonet.fr> wrote:
> I luckily worked kind of a work around, by
> turning off swapping, which forces Linux to reload all the stuff on the
> swap into memory, before disabling it. (then I turn swap on again of
> course).
One thing I noticed in Warty was that the kernel was swapping out
things that I needed far too often. To fix this, I lowered the
kernel's swappiness setting, which tells it how aggressively to swap
out unused data in memory. The default is 60 I think, and turning it
down to 10 or 20 made my system more responsive. If you want to try
this, here's how, but try not to break your computer.
$ sudo sysctl -w vm.swappiness=10
That will lower the swappiness for your current session, but when you
reboot it will go back to the initial value. If you want to use it
permanently, add:
vm.swappiness=10
to your /etc/sysctl.conf. In Hoary, the default swappiness has been
working well for me. If you end up changing this, you should probably
Google for swappiness so you can read about why it's a good thing and
why, in theory, you don't want to lower it. I guess it's had some
kinks worked out of it since the Warty kernel version, so now I agree
with it.
- Niran
More information about the ubuntu-users
mailing list