My old X61 has 2G in RAM and 3G in Swap. It seems my using-habit for Google Chrome is heavy (more than 20 tabs open most of the time) so my swap is normally being used above the 1.8G-mark. That means, my disk is constantly being written and read, and since this is the original hard-drive scare comes to my mind: will I blow-up my disk if I continue doing this? and the heat this disk-use's generating was absurd.
That's not good, at all, I prefer having cache used than swap; in Venezuela is not that easy to get a good sale on hard-drives (you know, is hard to get dollars here, since is illegal to buy them unless the govt gives you permission).
So the first thing that comes to my mind is
sysctl. If I wanted to cofigure swap it would be with a kernel parameter. So running
sysctl -a | grep swap throws me
vm.swappiness = 60, and a little google search tells me more about it.
If the swappiness is close to 0 then it will use the swap only if it is really necessary, if it is close to 100 then it will use the swap aggressively. Mine was at 60, and it was really aggressive.
The next steps for me was doing
sudo echo 'vm.swappiness = 1' >> /etc/sysctl.conf && sudo sysctl -p.
Now my system is really smooth and using Chrome + Terminal + Tmux + Rhythmbox is acceptable.