Ultimate Ubuntu performance tweaking guide

Lets start first with the kernel:

apt-get install build-essential libncurses-dev kernel-package
cd /usr/src
wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.20.tar.bz2

This will download the latest sources available, in my case linux-2.6.20.tar.bz2

cd /usr/src
tar -xjf linux-2.6.20.tar.bz2
cd linux-2.6.20

Now lets apply the Con Kolivas patches, these are patches designed to improve system responsiveness with specific emphasis on the desktop, but suitable to any workload.

HDParm

sudo gedit /etc/hdparm.conf

Concurrent Booting

Concurrent booting allows Ubuntu to take advantage of dual-core processors, as well as processors that hyperthread or multithread or what ever the different companies call it now.

More Here.