This is regarding vm.swappiness.
In my personal experiences the default vm.swappiness=60 is okay for most users who don't like tweaking.
If you need more speed you might want to reconsider using a lighter desktop environment such as fluxbox or icewm like I explain here :
http://www.ubuntuforums.org/showpost...9&postcount=13
which is part of this thread :
http://www.ubuntuforums.org/showthread.php?t=213694
But if you just like tweaking : here we go

.
If you have on average a lot of memory free (or used for cache) you probably want to prevent your system to start swapping. This is done by setting vm.swappiness to 0. In my personal experiences this is what you want for Xubuntu with 512 mb of memory or more and for Ubuntu (gnome) with more than 512 mb of memory.
$sudo sysctl vm.swappiness=0
sets your swappiness variable to 0
To get turn your swap off (and get everything which is needed back into memory)
$sudo swapoff -a
To turn it back on (being empty and it should stay almost empty because of vm.swappiness=0)
$sudo swapon -a
If you like your new settings you can make it more permanent by adding this line :
to /etc/sysctl.conf by using your favorite editor :
$sudo gedit /etc/sysctl.conf
After reboot vm.swappiness is 0
Additional information :
In my case I have 1 gb of memory and a large part isn't used (or only used for cache) I choose to prevent swapping as much as possible by vm.swappiness=0. For 512 mb of memory this is also the best setting if you use xubuntu and be careful (about not using too much memory).
This was the best setting for laptop with only 64 mb of memory running icewm / fluxbox : vm.swappiness=100. Because with that amount of memory swapping is needed anyway so better to do it as soon as possible.
In cases between 128 mb and 512 mb of memory you need to try and tweak and find out what works best for you. You can use "$free -m" to see whether swap is used.
-If you (almost) succeed in not using swap at all then set vm.swappiness to 0
-if your computer still needs to swap much set vm.swappiness to 100
-if you have little memory and don't notice any difference go for vm.swappiness=60
You can find more information about "free -m" and swappiness here :
http://gentoo-wiki.com/FAQ_Linux_Memory_Management