Comment 63 for bug 721896

Solution checked in Ubuntu 14.04.1

Use vm.swappiness & vm.vfs_cache_pressure to the minimum possible
Run the below command in Terminal
sudo gedit /etc/sysctl.conf

Add the below line at the end of the file. Select File > Save. Select File > Quit. Restart computer

This can be a workaround, if top command shows kswapd0 taking 99% or 100% cpu, while heavy memory activity
Heavy memory activity may be playing Dota2, copying large files, browsing faulty websites, etc...
Suggested swap partition size in Ubuntu 14.04 64bit with heavy memory activity
Atleast double the size of RAM or 20GB whichever is bigger
Use bigger swap partition than the current, if the above issue still persists
Example swap entry in /etc/fstab to enable swap manually in /dev/sda7
/dev/sda7 none swap sw 0 0