NEWS CATEGORIES:



NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
Home / News / Linux / Ubuntu Tips and Tricks

Ubuntu Tips and Tricks


Optimize Ubuntu Feisty Fawn for Speed

Tips for a faster Ubuntu machine!

By Marius Nestor, Linux Editor

3rd of May 2007, 14:03 GMT

Adjust text size:


Ubuntu Hacks
Enlarge picture
If you use Ubuntu (Feisty Fawn) as your Linux distribution, which everyone knows it's a pretty fast Linux operating system, you can also do some tricks in order to get a boost. I will teach you today some quick hacks on how to improve the overall performance of your system.

WARNING: Please follow the instructions below 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.

1. Boot tweaking

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 makes the boot process a little faster. All you have to do is hit the ESC button to see the GRUB menu when the computer starts, then select the second line (the one that looks like this: /vmlinuz-2.6.20-15-generic root=UUID=6162302f-3f32-4b73-bb56-c42f4f9fbce2 ro quiet splash) and hit the "e" key to edit that line. Add the word profile at the end of this line (don't forget to put a space before you type profile). Hit enter when you're done and then push 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, because after this process it will boot faster.

2. Filesystem tweaks

The following tweaks are for EXT3 and ReiserFS filesystems

Open a console and type:

[CODE=0]
sudo gedit /etc/fstab
[CODE=1]

Add the following options marked in bold to the root (/) mount line. In other words, it should change from this:

# /dev/sdb2
UUID=f4d4d73d-4141-4701-a7e2-ec41664483a7 / ext3 defaults,errors=remount-ro 0 1

into this:

# /dev/sdb2
UUID=f4d4d73d-4141-4701-a7e2-ec41664483a7 / ext3 defaults,errors=remount-ro,noatime,data=writeback 0 1

Now type the following command in the console:

[CODE=0]
sudo gedit /boot/grub/menu.lst
[CODE=1]

And add this option:

rootflags=data=writeback

to the end of the following lines:

# defoptions=quiet splash rootflags=data=writeback

# altoptions=(recovery mode) single rootflags=data=writeback

Now save and close, and type the following command in the console:

[CODE=0]
sudo update-grub
[CODE=1]

Type now the following command in order to manually change your filesystem "on-the-fly" into writeback.

NOTE: Please note that /dev/sdb2 is my root (/) partition. If you have the root (/) partition in another place, change it accordingly. Please look in /etc/fstab for this!

WARNING: The next trick is only for EXT3 filesystems! For ReiserFS this will NOT work, so don't run the following command, just reboot your system for the changes to apply.

[CODE=0]
sudo tune2fs -o journal_data_writeback /dev/sdb2
[CODE=1]

That's all, now reboot your system and when you get back, you should feel an increased speed in video, image or audio usage.

3. 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 is being used in 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 is not used and if something needs the same data again, then there is a very good chance to be in the cache memory.

In a console type the following code:

[CODE=0]
sudo gedit /etc/sysctl.conf
[CODE=1]

Now add the following line at the end of this file:

[CODE=0]
vm.swappiness=0
[CODE=1]

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.

4. Concurrent booting

If you have a dual-core processor or one that supports hyperthreading then concurrent booting allows Ubuntu to take advantage of them. Just open a console and type the following code:

[CODE=0]
sudo gedit /etc/init.d/rc
[CODE=1]

and find the line CONCURRENCY=none and change it to:

[CODE=0]
CONCURRENCY=shell
[CODE=1]

Save and reboot your computer.

5. IPv6 tweaking

In Linux, most of the installed software uses the IPv4 Internet protocol in order to connect to the internet and because the IPv6 protocol is enabled by default in Ubuntu, you must create a file to block this protocol. Type the following code in a console:

[CODE=0]
sudo gedit /etc/modprobe.d/bad_list
[CODE=1]

and add the next line in that file:

[CODE=0]
alias net-pf-10 off
[CODE=1]

Remember to hit enter after you've added the above line, save and exit.

That will be all for now, please report if you see any improvements to your system. If anyone has more improvements, you can post them here anytime, so others will know about them!

TAGS:

Ubuntu | Feisty Fawn | improvements


Rating:
Good (3.1/5) 16 vote(s) so far    

Read by 41,795 user(s) | Add comment | Link to this article
Subscribe to news | Print article | Send to friend

© Copyright 2001-2008 Softpedia
Contact:

 

 

SEARCH THE NEWS ARCHIVE :




Today's News
| Yesterday's News | News Archive


MORE RELATED ARTICLES:


French Parliament Votes Linux Over Windows

Sony PlayStation 3 Support in Linux Kernel

Free Download of Yellow Dog Linux for Playstation 3

Linux Kernel Vulnerability: IPv6 Sockets Local DoS

Dell Will Release Pre-installed Linux PCs

Ubuntu 7.04 - Well Done

User opinions:


Comment #1 by: kemelinux on 05 Dec 2007, 12:53 GMT reply to this comment

I've done all the steps mentioned above and noticed some improvement on disk speed. (when playing movies and so on)

However, my Parallels virtual machines became extremely slow. High CPU usage (99%) and lots of disk activity rendered the machine unusable.

Undoing points 3 (swappiness) and 4 (concurrent booting) solved the performance problem.


Comment #2 by: patrick on 24 Dec 2007, 07:32 GMT reply to this comment

The CONCURRENCY also generated problems at my laptop (with HALL to be precise). I would not recommend to switch it off!


Comment #3 by: nicodarious on 21 Jan 2008, 13:41 GMT reply to this comment

Although I am sure that this is a great tutorial and it has helped many out, but I have tried it with my Ubuntu system and now dbus no loner starts my gnome-power-manager correctly. Until I figure out how to repari it, I have had to start manually restarting dbus and then starting gnome-power-manager separately afterwards to get suspend and batery monitor to work corectly. Is there any way for you to add how to keep this from happening in your tutorial? It would be very pleasant to see a little fix at least. THANKS!

Comment #3.1 by: cipher_no1 on 24 Apr 2008, 05:00 GMT

have u solved ur dbus prob, nicodarious, i had the same prob its caused by the conurency option, if u go to system>addministration>services u can set dbus priority to S10 it will work fine


Comment #4 by: xochi on 24 May 2008, 03:00 GMT reply to this comment

When you say: your operating system will NOT work anymore.
Does it mean a reinstall?
I just used this tutorial on 7.10 and Xwindow did NOT load.
Any way to revert?

Comment #4.1 by: Marius Nestor on 24 May 2008, 05:18 GMT

Yes, reinstall.... Anyway, if X11 is not loading anymore, you can edit the /etc/X11/xorg.conf file and change the video driver to nv or vesa. But it would be better if you write here the exact error it gave you...

Share your opinion:

Your Name:
Your Email Address:
(will not be used for commercial purposes)
Solve this to prove you're not a bot: =
Your review/opinion:

 






SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   ENTER NEWS SITE   |   ENGLISH BOARD   |   ROMANIAN FORUM