How to Speed up Your Ubuntu

Ubuntu Linux by default uses the EXT3 file system and there are 3 journaling methods for EXT3 system.

  • Journal Data Writeback
  • Journal Data Ordered
  • Journal Data

On default installation Ubuntu chooses “journal data ordered” and In data=ordered mode, ext3 only officially journals metadata it logically groups metadata and data blocks into a single unit called a transaction. When it want to write the new metadata out to disk, the associated data blocks are written first. data=ordered mode effectively solves the corruption problem found in data=writeback mode and most other journaled filesystems, and it is done without requiring full data journaling. In general, data=ordered ext3 filesystems perform slightly slower than data=writeback filesystems, but slightly faster than the full data journaling counterparts. To speed it up we’re going to change it to data=writeback system.

Open your Grub boot menu.
sudo nano -w /boot/grub/menu.lst
Try Looking for the Defoptions and Altoptions and make them look like the entry below.
# defoptions=quiet splash rootflags=data=writeback# altoptions=(recovery mode) single rootflags=data=writeback
update your Grub since you have altered it.
sudo update-grub
edit the Fstab because it will be expecting these options.
sudo nano -w /etc/fstab
add the (data=writeback and noatime=0) flags to your hard drive. It might be a little confusing because of the new naming system. Look for the (,errors=remount-ro) and add it afterwards.
defaults,errors=remount-ro,data=writeback,noatime 0
Now you tell your system to use them both.
sudo tune2fs -o journal_data_writeback /dev/yourdrive

Concurrent Booting

Concurrent booting allows Ubuntu to take full advantage of dual-core processors, as well as processors that hyperthread or multithread.

These settings are located in your /etc/init.d/rc file.
sudo gedit /etc/init.d/rc
Look for CONCURRENCY=none and change it to:
CONCURRENCY=shell

Swapping

swappiness takes a value between 0 and 100 to change the balance between swapping applications and freeing cach. Kernel will always prefer to find inactive pages and swap them out. Default swappiness is 60 if a value of 0 gives could shrink the cache to a tiny fraction of RAM.

go to /etc/sysctl.conf file
sudo gedit /etc/sysctl.conf
and set the swappiness to
vm.swappiness=0

Speedup Broadband Internet

You have to open your /etc/sysctl.conf file back up again.

scroll to the bottom and just add these lines to it.
net.core.rmem_default = 524288

net.core.rmem_max = 524288

net.core.wmem_default = 524288

net.core.wmem_max = 524288

net.ipv4.tcp_wmem = 4096 87380 524288

net.ipv4.tcp_rmem = 4096 87380 524288

net.ipv4.tcp_mem = 524288 524288 524288

net.ipv4.tcp_rfc1337 = 1

net.ipv4.ip_no_pmtu_disc = 0net.ipv4.tcp_sack = 1

net.ipv4.tcp_fack = 1net.ipv4.tcp_window_scaling = 1

net.ipv4.tcp_timestamps = 1net.ipv4.tcp_ecn = 0

net.ipv4.route.flush = 1

or the sysctl to take effect.

sudo sysctl -p

and that’s all about it and from what I understand these tweaks will work with all forms of Linux. They are not Ubuntu specific.

from http://www.my10sen.com/2007/10/05/ubuntu-a-speedup-guide/

Leave a Reply