Leatherboard1

a complete guide to tweak, speed up Ubuntu


1. Update

Just after installation, do an update. Fixing problems increases your system speed.

2. Services

Install the tool:

sudo apt-get install sysv-rc-conf

Start configuring services

sudo sysv-rc-conf


You can turn off the following services. (Depending on your machine, you may not have some of them. And pay attention to reminders in the parenthesis.)

alsa (if you don't use alsa sound subsystem)
anacron
apmd
atd
bluez-utiles (if you don't have bluetooth devices)
cupsys (if you don't use printing)
dns-clean (if you don't use dial-up)
evms
fetchmail
gdomap
hplip (if you don't use HP printing and imaging systems)
mdamd (if you don't use raid)
mdamd-raid (if you don't use raid)
portmap (if your computer is a pure client)
usplash (if you don't want to see the splash booting screen. Also, delete the word splash. sudo gedit /boot/grub/menu.lst)



3. reduce swapiness

sudo gedit /etc/sysctl.conf
add:
vm.swappiness=0
and save.

4. faster broadband

sudo gedit /etc/sysctl.conf
add:

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 = 0
net.ipv4.tcp_sack = 1
net.ipv4.tcp_fack = 1
net.ipv4.tcp_window_scaling = 1
net.ipv4.tcp_timestamps = 1
net.ipv4.tcp_ecn = 0
net.ipv4.route.flush = 1

sudo sysctl -p





5. Sessions

Go to system->preferences-> Sessions.
Delete the ones you don't need, such as bluetooth if you don't have bluetooth devices, printing, if you don't use a printer.
You only need restricted driver manager once. Once the drivers are installed, you don't need it any more.
I don't use Evolution so I don't need Evolution Alarm Notifier.
Delete update notifier because constant updating really doesn't make your system healthier (Not to mention the consumption of resources). Just update after installation and manually update afterwards.

6. Remove extra virtual terminals
cd /etc/event.d
sudo mv tty3 tty3.bak
sudo mv tty4 tty4.bak

do it up to tty6

7. Gnome
sudo gedit ~/.gtkrc-2.0
Add this:

gtk-menu-popup-delay = 0

Save and exit.

I personally think icons use a lot of resources in the menus and I read the words instead of the icons anyway. So I turn it off.

System->preferences->appearance->interface
uncheck show icons.
You can choose none in visual effects tab and that helps performance much too.

9. Profile startup
After all these tweaks, restart your system.
When it enters the grub booting screen, press Esc to stop it. Press e on the default Ubuntu option to edit it and e again at the kernel line. Add the word profile in the end, press enter and press b. The first time it'll start slower but it'll start faster for all the following startups.
(It reorganizes the startup files which kind of works like defragmenting in Windows. )

10. Ubuntu tweak
There are many more options you can change with Ubuntu tweak.
The tool is straightforward to use so no further explanations here.

11. Enable concurrent booting.
Concurrent booting takes advantage of dual-core processors and CPUs that feature hyperthreading. To set this up, edit the "rc" file in the /etc/init.d directory:

sudo gedit /etc/init.d/rc

Find the line that says CONCURRENCY=none and change it to:

CONCURRENCY=shell

12. Disable IPv6 (poor IPv6. People disable it to speed up Linux; people disable it to speed up Firefox...)
Edit /etc/modprobe.d/aliases and change the line:
alias net-pf-10 ipv6
to
alias net-pf-10 off #ipv6

13. Aliasing hostname to localhost
Modify /etc/hosts's first two line as follows:
127.0.0.1 localhost yourhost
127.0.1.1 yourhost
where yourhost, is your chosen hostname. This will fasten up applications load.

14.Preload
Preload your frequently used applications.
sudo apt-get install preload

15.Speed up your HDD
Install hdparm with
sudo apt-get install hdparm
and enable 32 bit IO and UDMA if it wasn't before with:
hdparm -c3 -d1 /dev/yourdevice
where /dev/yourdevice is your HDD.
And to make it persistent you also need to edit /etc/hdparm.conf, and make it run at every startup, so you have to enable the "Hard disk tuning (hdparm)" service with System->Administration->Services.

Sources:
(Where the services tweak came from. Also, if you over-tuned and have problems with services, this post recorded the defaults)
http://ubuntuforums.org/showthread.php?t=89491
(Broadband and concurrency tweak, but it's not available any more)
http://tvease.net/wiki/index.php?title=Tweak_ubuntu_for_speed
(Menu delay tweak.)
http://lifehacker.com/software/linux-tip/speed-up-gnome-menu-269934.php

(Tweak 12, 13, 14,15)
http://yoten.blogspot.com/2007/04/speed-up-ubuntu.html


Technorati : ,
Del.icio.us : ,


9 comments:

Anonymous said...

increasing broadband tweak? will that work on other distros?

Paul said...

You're right. This tweak changes tcp window sizing parameters. So it should work with all distros.

Anonymous said...

why not install prelink in addition ? :)

Anonymous said...

Hi, Paul. I just want to know how to disable services on sysv-rc-conf. On a given service, do I simply uncheck all the checked runlevels so that all the runlevels are unchecked for that service?

I also sent you an email with this same question, just letting you know.

Paul said...

Hi David,

This guide is not in particular for Ubuntu 8.04. It was actually for 7.04,7.10.

But most of these fundamental things are the same.

So just press space to uncheck all the checked run-levels.

Justin Hernandez said...

Hey Paul thanks for these tips, I feel like I have a brand new ubuntu install.

Anonymous said...

восточные сувениры оптом подарки для женщин .
подарок купить подарочный сертификат.

Paul said...

Justin Hernandez, you're welcome. Glad I could help.

Gold Guide for World of Warcraft said...

good post :)