Softpedia
 

NEWS CATEGORIES:



NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
Home > News > Linux > Ubuntu Tips and Tricks

May 3rd, 2007, 14:03 GMT · By

Optimize Ubuntu Feisty Fawn for Speed

SHARE:

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
sudo gedit /etc/fstab

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
sudo gedit /boot/grub/menu.lst

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
sudo update-grub

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
sudo tune2fs -o journal_data_writeback /dev/sdb2

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
sudo gedit /etc/sysctl.conf

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

CODE
vm.swappiness=0

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
sudo gedit /etc/init.d/rc

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

CODE
CONCURRENCY=shell

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
sudo gedit /etc/modprobe.d/bad_list

and add the next line in that file:

CODE
alias net-pf-10 off

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!

TELL US WHAT YOU THINK:

66,378 hits · 10 comments · Link to this article · Print article · Send to friend · Subscribe to news

MUST-READ RELATED ARTICLES:


Sony PlayStation 3 Support in Linux Kernel

Linux Kernel Vulnerability: IPv6 Sockets Local DoS

Free Download of Yellow Dog Linux for Playstation 3

Dell Will Release Pre-installed Linux PCs

Ubuntu 7.04 - Well Done

READER COMMENTS:


Comment #1 by: kemelinux on 05 Dec 2007, 12:53 UTC 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 UTC 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 UTC 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 UTC 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...


Comment #5 by: Mikael Hjelm on 11 May 2009, 19:32 UTC reply to this comment

When i edited the /etc/fstab i got some error and this caused my root filesystem to mount readonly. This caused X to fail start.
With that i couldnt unedit the fstab file.
I finally managed to remount the root filesystem
mount -o remount,rw /dev/sda1 /
With this i could edit fstab and remove the data=writeback option.


Comment #6 by: oliver on 10 Jun 2009, 23:50 UTC reply to this comment

worked fine for me just did not notice anything with (sudo tune2fs -o journal_data_writeback /dev/sdb2)???


Comment #7 by: ActionParsnip on 27 Sep 2009, 14:21 UTC reply to this comment

DO not run gui apps like gedit with sudo. The CORRECT way to run GUI apps is to use gksudo (Gnome / XFCE) or kdesudo (KDE)

http://www.psychocats.net/ubuntu/graphicalsudo


Comment #8 by: smartassgetsnone on 17 Sep 2010, 03:21 UTC reply to this comment

Dude, [roblems with GUIS on win 7 , install xp on virtual drive, then run in 32 bit win xp . running win 7 is 64 bit no matter what , you cant run 32 bit system files . even in winxp mode , but you can run them on a virtual xp drive

Copyright © 2001-2012 Softpedia. Contact/Tip us at

WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM