So what if Ubuntu is a fast operating system?... There is always room for some more tweaking... and I am talking here about some aspects that are NOT useful for the end-users (yes YOU, the regular Ubuntu user). The hacks presented in this guide will greatly improve the overall performance of your Ubuntu 8.04 Linux OS.
WARNING: Please follow the following instructions very carefully, in the order in which they are listed below, and reboot your machine after each one. If not, your operating system will NOT work anymore and you will have to reinstall it.
Step 1 - Boot tweaks
Tweak One - Boot profile
It is a very good idea to do this tweak when you first install Ubuntu, but you can also do it anytime after the installation. This will reorganize some files that are read when the computer boots and it will make the boot process a little faster. All you have to do is hit the ESC button to see the GRUB menu...
...select the first line
"Ubuntu 8.04, kernel 2.6.24-16-generic" and hit the
e key on your keyboard...
...on the next screen select the second line, the one that looks like this:
"kernel /vmlinuz-2.6.24-16-generic root=UUID=6162302f-3f32-4b73-bb56-c42f4f9fbce2 ro quiet splash" and hit the
e key again...
Editor's note: In the above screen I've used an encrypted Ubuntu 8.04 installation, that's why the kernel line looks different!
All you have to do now is add the word
profile at the end of this line (don't forget to leave one space before you type profile)...
Hit enter when you're done and then hit the
b key on your keyboard in order to boot the system. It will take a little longer to boot, but only this one time.
Tweak Two - Speed up GRUB
GRUB "slows down" the boot process of your Ubuntu machine because it waits about 3 seconds before booting the system, in order for you to hit the ESC key in case you need to choose another operating system from the list or edit it. This option is NOT necessary for most users and it is annoying sometimes. If you think that this will not allow you to edit GRUB anymore, think again because you can still hit ESC (just be faster). Ok, so this tweak will remove that 3 seconds waiting option and, as a bonus, it will also beautify your boot splash!
For this tweak we need the StartUp-Manager program. Open the Add/Remove program, choose "All available applications" option from the drop-down list and search for "startup"...
The StartUp-Manager tool will be the first one; check the box in front of it and click on the 'Apply Changes' button to install it. Close the Add/Remove program when done and you can find StartUp-Manager under
System -> Administration menu...
When the program opens, we are ONLY interested in the first tab (Boot options)!
As you can see in the above screenshot, all you have to do is set the "Timeout in seconds" option to
0 and select a better resolution and color depth for the boot splash (I have a 19" monitor, so I have selected the 1280x1024 resolution (just like the one of my desktop) and 24 bit color depth).
Close the StartUp-Manager software and it will immediately apply the changes. Reboot! Your system will boot faster and the boot splash will look much better now.
Tweak Three - Stop unneeded startup programs
By default, Ubuntu starts some background programs and daemons that most of the users don't need. Therefore it will be a very good idea to close them, as they are "memory eaters" and if you have 512 MB of RAM or less, the last thing you wanna do is leave these unneeded programs eat up your memory. For this tweak, you will need to start the Sessions tool from the
System -> Preferences menu...
On the 'Startup Programs' tab uncheck (as you can see in the screenshot below) the following entries:
1. Bluetooth Manager (remove this if you do NOT transfer files via bluetooth);
2. Check for new hardware drivers (this daemon is necessary ONLY if you change your hardware often. Most users don't need this process running in the background!);
3. Evolution Alarm Notifier (remove this if you do NOT use Evolution as an e-mail client. I prefer Thunderbird!)
4. Print Queue Applet (remove this if you do NOT own a printer).
That's it! Close the Sessions utility and reboot your system.
Tweak Four - Automatic login
In order to get faster from the moment you've turned your computer on until you arrive to the desktop, you can set GDM (the GNOME login manager) to automatically log you in. The disadvantage of this tweak will be the fact that anyone who powers up your machine will get access to all your files. But, if you have an
encrypted Ubuntu 8.04 installation, this tweak will be just perfect!
Go to
System -> Administration -> Login Window...
...input your password, go to the fifth tab ("Security"), check the 'Enable Automatic Login' option and choose your username from the drop-down list.
Step 2 - System tweaks
Tweak One - Speed up your hard drive
The following tweaks assume that you are using an ext3 filesystem for your Ubuntu OS. They will offer a noticeable performance boost!
Open a terminal (
Applications -> Accessories -> Terminal) and type:
CODE
sudo gedit /etc/fstab
WARNING: The following is just an example! Do NOT copy the lines into your /etc/fstab file! Just REPLACE the options marked with underline with the ones marked with bold!
From this:
# /dev/sda1
UUID=19f70288-7340-40c0-82d1-ee4b218fee1d / ext3 relatime,errors=remount-ro 0 1
To this:
# /dev/sda1
UUID=19f70288-7340-40c0-82d1-ee4b218fee1d / ext3 noatime,nodiratime,errors=remount-ro,data=writeback 0 1
See the following screenshot if you do not understand...
Save and close. Now type the following command in the terminal:
CODE
sudo gedit /boot/grub/menu.lst
And add the following option...
rootflags=data=writeback
...to the end of the following lines:
# defoptions=quiet splash vga=795 (by default, Ubuntu doesn't have the "vga=795" option on this line. It appears if you did the second tweak from the first step (see above)).
# altoptions=(recovery mode) single
They must look like this...
Save and close, and paste the following command in the terminal:
That's all, now reboot your system and when you get back, you should feel an increased speed in video, image or audio usage.
Tweak Two - Tuning Swappiness
If you have been running Linux systems for some time and you have used applications like 'top' to see what's going on in your machine, then you've probably wondered: Where has all my memory gone? You should know that the largest place it is being used in is the disk cache, as the cached memory is free and it can be replaced anytime if a newly started application needs that memory. Linux systems are made like this to use so much memory for disk cache because the RAM is wasted if it is not used and if something needs the same data again, then there is a very good chance to be in the cache memory.
Open a terminal (
Applications -> Accessories -> Terminal) and paste the following code:
CODE
sudo gedit /etc/sysctl.conf
Now add the following line at the end of this file:
The number at the end of this line can be between 0 and 100. At 100 the Linux kernel will prefer to find inactive pages and swap them out, while value 0 gives something close to the old behavior where applications that wanted memory could shrink the cache to a tiny fraction of RAM. Save, close and reboot.
Tweak Three - Concurrent booting
If you have a dual-core processor or one that supports hyper-threading then concurrent booting allows Ubuntu to take advantage of them. Just open a console and type the following code:
CODE
sudo gedit /etc/init.d/rc
and find the line
CONCURRENCY=none and change it to:
Save, close and reboot your computer.
That will be all for now. With these tweaks, your system should perform better and boot faster. Please report if you see any improvements to your system and if anyone has more improvements, you can post them below so others will know about them!
MORE RELATED ARTICLES:
Ubuntu 8.04 Release Party Spot in Berlin Metro System
Ubuntu Ultimate Edition 1.8 Launched
Mark Shuttleworth Wants Synchronicity between Linux Distributions
Ubuntu Weekly Report: 11th - 17th May, 2008
Introducing UbuntuME 8.04
Weakness in OpenSSL on Debian and Ubuntu Discovered
Encrypted Ubuntu 8.04
One-Click Software Installation for Ubuntu 8.04
Installing Ubuntu 8.04 LTS
Ubuntu 8.04 LTS Released