Linux (as most other, if not all, modern operating systems) uses a technique called Virtual Memory to give programs the impression that they have plenty
of memory available, even more than the actual RAM size of the machine. This technique implies using disk memory (the swap partition) to simulate actual RAM, swapping pieces back and forth. Of course, whenever this swapping process runs, you will experience longer response times and slower performance.
The kernel tries to prevent future swapping by doing some of it in advance, and you can alter the degree to which this is done by changing a parameter from 0 (minimum swapping, done only if needed) to 100 (try to free as much RAM as possible).
There are two ways to change this. The standard value is set at 60. To lower it, as the root user, implement the following:

Note that this change will last only until the next time you restart your box. If you want to make the change permanent, edit /etc/sysctl. corif, and add the following line: Now, it will be loaded every time you boot. If you want to test the changes, make the edit to lete/sysetl. can! and then reload it with/sbin/sysetl-p.
Is it better to have lower values (down to 5 or 10) or higher values (up to lOa)? Personally, I use 5, and I like the way my machines (desktop and laptop) work. If you notch it up, the kernel will use more CPU time to free RAM in advance; if you turn it down, the CPU will be freer, but there will be more I/O.

For CPU-intensive programs, if you have fast disks, go with lower values, as I did myself. This will produce improvements, such as when switching between applications, because it's more likely that they reside in physical RAM instead of on the swap partition. Even if you set 'swappiness' to zero, if needed, the kernel will do its swapping, so once again, you would benefit from getting more RAM if possible.

However, Linux kernel developer Andrew Morton suggests using 100, and author Mladen Gogale observes he found no difference, so you may want to try different values and see what you prefer (see the Resources section for links to articles on this topic).