Great Ubuntu Tweaks
UPDATE: Ubuntu is evolving and maturing very quickly. Some of these tips for speeding up your system no longer apply. Ubuntu 10.04, the Lucid Lynx, is faster and snappier. (Click here to download Ubuntu 10.04 LTS now).
A stock installation of Ubuntu can easily meet the needs of the average user, and there are several handy guides to tweaking the default settings to get the most from your system. Here are some of the tips and suggestions on how to improve your day-to-day experience in the Ubuntu gnome desktop.
Most of these tips and tricks are for Ubuntu Hardy Heron, but some of them are effective in earlier and some in later versions.
Revision for Karmic: I recently installed the Karmic Koala and decided to try Google's Chrome-Browser. Chrome is very fast, faster than Firefox without the IPv6 tweak.
Disabling IPv6 in Firefox as well as in grub made a lot of difference on my ThinkPad. – Instructions are at the end of the article.
A personal note: Ubuntu Hardy Heron is an LTS (long-term-support) release and as such, the emphasis is on stability. If you want a faster Desktop, you should really choose a different release or even an entirely different distribution, (*as of Ubuntu 10.04 LTS, Ubuntu is a very fast distro right out of the box) - there are some that are configured specifically for speed-gains. If risking a bit of stability isn't an issue, go-ahead and tweak away. - Most of these tweaks can be reverted easily so long as a bit of foresight is practiced.
Any configuration-file changes suggested here are made through the Gedit editor. Unless you've turned this feature off, Gedit creates a backup-copy before saving – I'd strongly suggest getting in the habit of making a backup-copy of any configuration file before making changes - this way, if you run into problems, the fix is as easy as renaming your backup file.
Though no special skill is needed to perform any of these tweaks, I'll assume you know how to access a terminal, copy files, and move between directories. (For those who don't, here's a link to a very concise terminal how-to. Using the Terminal: Ubuntu Documentation)
Reducing Boot Time
First things first. There are several easy tweaks to cut boot times. The engineers at Ubuntu are always working to improve boot times. The new Lucid Lynx LTS boots in less than a minute! For other releases, here are a couple tweaks to speed up your boot times.
Tip no#1 --- Concurrency
If you're computer has multiple CPU cores, (Intel CoreDuo, Core2Duo, etc, or AMD Athlon X2), Ubuntu is capable of using the multiple cores to run boot scripts concurrently. To enable the feature, open a terminal and type the following at the command prompt: gksu gedit /etc/init.d/rc
The file will open in Gedit. Find the line that reads:
CONCURRENCY=none
and change it to read:
CONCURRENCY=shell.
The scripts used during the startup process can now be read concurrently, and, depending on your hardware, you should see an improvement in boot times. ( I say should, because it doesn't always make a big difference).
Note: There is a notice at line #102 about 'startpar' that suggests a bit of further reading.
If you check the Ubuntu forums you'll find several posts about CONCURRENCY, and how people have tried it without any gains in boot-times - they probably never looked further than "CONCURRENCY=none".
From /etc/init.d/rc
line 102 # insserv package to be enabled. Boot concurrency also requires
line 103 # startpar to be installed.
Tip no#2 --- Sessions
From the desktop, navigate to System>>Preferences>>Sessions, (Startup Programs in Lucid), and in the Startup Programs tab, scroll through the list of applications that are started at boot. Disable any of the services you're sure aren't needed by un-checking them.
Tip no#2a
While your at it, go to System>>Administration>>Services and have a look through the list of services starting automatically every time your computer boots.
Some of the services aren't necessary for the average user, but essential to those who use them, so they're included by default.
I.E. - Your computer might not have Bluetooth, so there's really no need to have the service running. Also Braille Display Management, and the Computer Activity Logging services - some users need these, but certainly not all. If you don't need a specific service, disable it. You can start any of the listed services through the command line if you need them later on. - Man-pages are wonderful for information about services.
Tip no#3 --- Readahead
Enable Readahead. Ubuntu includes something called "readahead" that makes it possible for the system to cache the files needed at boot time, thereby eliminating much of the hard disk seek times associated with the boot process.
Warning: I've tried this procedure, and though the performance gain is very noticeable from the Login screen onward, (if you do all the steps), there is also a performance drop from the Grub selection menu to the Login screen. Properly implemented this is a great tweak. I'll list the short version here, but I'm seriously recommending a visit to the Ubuntu forum and a read-through of the full tutorial.
Here is the link to the full How-to:
Ubuntu Forum Profile/Readahead How-To
The easy way:
Start or Restart the computer. At the grub screen, select the usual menu item, then press e. You can now temporarily edit the boot menu entry.
Use the cursor key to navigate to the second line, (which should begin with the word "kernel..."), then press e again.
Use the right arrow/cursor key to move to the end of the line and after the words
ro quiet splash add a space, then: profile
Now press Enter, then d and the computer should boot.
Speeding up the Desktop Environment
As with system booting, snappier performance in your desktop environment is also possible.
I'd like to mention again at this point that Ubuntu is a very well-built OS and was specifically designed not to need much configuring; But Ubuntu is also one of the distributions that lends itself quite well to fine-tuning and a bit of experimenting. - It's very robust and not likely to break. So tweak away.
Desktop Tip no#1 --- Alltray.
Ok, Alltray isn't really a tweak, it's an application. With Alltray you can minimize any application to tray. Essentially, Alltray places your running applications in the background, so it seems they're not running at all, but when you click their icon, they are instantly brought to the foreground. It's a great little application that reduces launch times to almost zero.
Easy to install through the Synaptic Package Manager, or on the command line with:
sudo apt-get install alltray.
Alltray is resource-friendly too. To test it, install Alltray, open a bunch of applications and games, click on them with the Alltray pointer to "park" them in the tray, then type top in a terminal to see what's running and what resources are in use.
Desktop Tip no#2 --- Preload
If you'd like your desktop apps to load a little faster, you could also try Preload.
Preload "observes" your desktop activities and tries to guess which apps you're likely to use as you're working. It then preloads the libraries needed by those apps to reduce load times when they're launched.
On my test computer it reduced the load times for Firefox and Evolution by half. - I've read that preload is not the best thing for your system because it keeps processes running in the background and refreshes quite regularly so as to be ready when called upon. - Test it with top.
In my case preload worked quite well, and if it weren't for Alltray...
...some people don't like Alltray, and preload might be a better option.
To install preload, go to System>>Administration>>Synaptic Package Manager and type "preload" into the search form.
To install through the terminal, simply type
sudo apt-get install preload.
After installing, in a terminal type:
sudo preload
to start the daemon.
Preload will run and set up it's configuration file. After that Preload will automatically run in the background when the computer is in use.
That's it, preload will now run in the background as a daemon, and you should begin to notice a difference in the load times for applications which you use regularly on your desktop.
If you want to change the configuration for preload, have a look at the configuration files, - they're well commented. Most of the default settings are changeable.
To look at the configuration file, in terminal type:
sudo gedit /etc/preload.conf
A note: This daemon is supposedly better than prelink, which can damage your system if used incorrectly. Source: How-To Forge.
Desktop Tip no#3 --- IPv6
In some cases disabling IPv6 can make a big difference in Firefox's performance. To disable IPv6 in grub, as a boot-option, open a terminal and type:
The Simplest way to turn off IPv6 protocols is to type: about:config in Firefox's url address bar, then, in the filter type:IPv6.
The first line will read:network.dns.disableIPv6...default...boolean....false
Double-click the line to toggle it to true instead of false
sudo gedit /etc/default/grub
(You might want to try nano instead, it's faster than GEDIT, and can be used in a non-graphical environment - very handy when you're stuck in a command-line environment).
Now find the line that reads: GRUB_CMDLINE_LINUX=""
and change it to: GRUB_CMDLINE_LINUX="ipv6.disable=1"
or: GRUB_CMDLINE_LINUX="ipv6.disable=1 quiet splash"
because splash causes in problems in some cases.
Save, exit and restart (in Lucid you also have to do "sudo update-grub" to generate a new grub file).
You might want to time the loading of a couple of different sites before making the changes so you can gauge the effectiveness of the tweak.
In my case Firefox beat Google Chrome hands down with this tweak, but results will vary depending on your hardware.exit





Comments
Post new comment