Migration finished

The migration is finished. You can now find all the articles that were available under the Blog section of this website at the following URL: http://blog.braccini.info. The old Blog session is no longer available on this website. All that remains from the old Blog section is the News section that has now been inserted in the main menu.

Alessio Maria Braccini

PhD, Researcher, Consultant

Home
Speed up Ubuntu!!! PDF Print E-mail

Ubuntu is nice. It is a very good Linux distribution, according to my humble opinion. I have been using it with plenty of satisfaction for a couple of year till now. But when you use a system everyday, even if it is faster than a flashlight, you want it to be faster, much more faster. There are many hints on how to speed up Ubuntu: reduce boot time, reduce executable load time, reduce disk usage, reduce memory usage and so on. This article will indicate a selection of the best articles or tutorials available over the internet which explains how to make Ubuntu faster.

What can I do to make... it faster

There are many things that could be changed to try to make Ubuntu faster. Not each and every modification will increase Ubuntu speed. Sometimes modifications will not be noticeable by a human eye, some other times you will find the system more quick and rensponsive. The configuration and modification you can make vary, mainly they depends on the version of the distribution you are using (ie: Feisty, Hardy) and the type system you are using (ie: workstation or server).

Boot time

   
Generally speaking you can increase boot time reducing the number of services Ubuntu loads (but be sure to unload only the one you do not really need). Another opportunity is to profile the kernel: this will require a modification of your bootloader configuration and a very long first boot where the kernel tries to identify which files are needed during boot time to increase its access speed. So if you chose this way, you have to wait a bit for a long reboot but you will be rewarded by shorter boot times afterwards. The last possibility you have to increase boot time speed is to parallelizee the boot process.
If you are particularly against time losses and you always use Ubuntu on you box, you can disable the timeout of your bootloader. Usually Grub (but Lilo con be configured to behave in a similar way) waits 3 seconds before loading the kernel, in order to let the user enter its menu if he wishes so. If you think this is a compleate loss of time, you can disable the timeout. Doing so Grub will immediately load the kernel and boots it, reducing boot process length.
These are the links of selected resources over the internet that will guide you through the Ubuntu boot time tweaking:
 
In the system
 
Ok, now we have tweaked the boot process to make it faster. Now Ubuntu loads the kernel and brings us to the login screen. If you are using a workstation and you immediately want to go to the desktop without waiting a second, you can enable the auto-login (provided you are the only user of the system or you use only one account).
To increase the loading time of the executables you can enable the prelinking. The prelinking will affect all the executables that make heavy use of shared libraries: these executables links all these libraries when they are invoked. With the prelinking activated the addresses of the shared libraries are solved in advance so the executable loads faster. Executables usually loads some files which may be needed for their execution. With the preloading mechanism you can load these files in the memory in advance. The preload will monitor which files are frequently used by applications and will load them in memory when the system is idle (not suggested for systems without a large memory).
What to do next? All the executables, the shared libraries and the files used by you apps are stored on the hard disk. Increasing hard disk speed can be useful to speed up the system. Usually the installer configures the hard disk at the top of its performance (provided it knows the piece of hardware) but you can manually check whether everything is ok or not. You can use hdparm to verify if your hard drive is working at the fullest speed possible. The same command is used to change the configuration of the hard drive. You can also change the configuration of your partitions (in /etc/fstab) to make disk access faster.
Originally Linux was born as a server system, consequently the use of the virtual memory (the swap) it makes is not always the most suitable for workstation.  Linux decides how often it will use the swap memory on the base of a kernel parameter, the swappiness. By default this parameter is setted to a value which forces Linux to use the swap memory very often. If you have a large memory and you are using a desktop system you can reduce it.
When you have increased the executables loading speed, the hard drive speed and maximized RAM usage you can just free some space on your hard drive removing unused packages.
Some conclusions
 
All the hints given in this article and all the configuration shown in the linked pages produces slightly improvements in Ubuntu speed, you may notice them or not, it depends on the way you use your system. Do not expect you computer to run faster than a space rocket, these are only tweaks. By the way these are not all the possibility you can have to increase Ubuntu speed (maybe some reader may suggest new ones in the comment box), but these are general and affect the whole system. There are many others focusing on KDE or GNOME or OpenOffice speed improvement, maybe I will show them in a future article.
Do you think your computer is slow? You can tweak it. Do you still thing your computer is slow? Then go and buy a new one Tongue out.
 
 
 
Joomla 1.5 Templates by Joomlashack