Swap files are what the Linux system uses to temporarily write things to disk. If you have enough RAM available, Linux uses that instead of the hard drive. But sometimes it's still over aggressive in writing to the swap drive.
Naturally, you can configure how often the OS falls back on the swap disk. How much this will speed things up is debatable -- the out-of-the-box setting will strike a nice balance most of the time -- but if you're really suffering, it's worth a try.
Before you change anything, run this command and look at the output number. The higher the number, the more often the kernel will use the swap disk.
<tt>$ sudo cat /proc/sys/vm/swappiness</tt>
Most distros set this number around 50 or 60. If you'd like to lower that, open up /etc/sysctl.conf:
<tt>$ sudo gedit /etc/sysctl.conf</tt>
Naturally, if you're on KDE, swap kate for gedit (or use emacs, vi or any other text editor you're comfortable with).
Add this line to the sysctl.conf file:
<tt>vm.swappiness=10</tt>