Hi,
here a list of improvements for your box.
Be aware of the potential disaster the rm -rf command can cause to your system! (Iowan)
Works perfect on Ubuntu Lucid and Xubuntu Oneiric; both machines in my case are very with low profile hardware; an old Laptop and "new" netbook
Make some performance tests
ADSL Speed
For the ADSL connectivity go to:
http://www.speedtest.net/
and track down the values
Interface environment
Download GtkPerf for the Gnome/XFCE
Execute:Code:sudo apt-get install gtkperf
and track down the values (basically time)Code:gtkperf
NOTE
Please, for practicality of this "guide", I suggest to install gedit in order to follow the commands indicated if you are not an experienced user and if you are not in Gnome environment.
1) Decrease the number of available consolesCode:sudo apt-get install gedit
Edit:
Find this value:Code:sudo gedit /etc/default/console-setup
Replace with this value:ACTIVE_CONSOLES="/dev/tty[1-6]"
Save. ExitACTIVE_CONSOLES="/dev/tty[1-2]"
Two virtual consoles are fairly enough for a personal machine.
2) Improve system and network via sysctl.conf
Save the original sysctl.conf
Create an empty sysctl.confCode:sudo mv /etc/sysctl.conf /etc/sysctl.conf.ORIGINAL
And paste the following (in red values only for notebook/netbook):Code:sudo gedit /etc/sysctl.conf
Save. Exit. Load the values to the system permanently:##Improve system
#Improve memory
vm.swappiness=10
#File/folder browsing speed
vm.vfs_cache_pressure=50
#Set maximum amount of memory allocated to shm to 256MB
kernel.shmmax = 268435456
#(default 499)
vm.dirty_writeback_centisecs = 1500
#(default 10)
vm.dirty_ratio = 20
#(default 5)
vm.dirty_background_ratio = 10
#(default 0)
vm.laptop_mode = 5
## End improve system
## Improve Network and tweak broadband
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
## End improve Network and tweak broadband
3) Optimize UI and browsing experienceCode:sudo sysctl -p
Discover your hostname, type in terminal:
The output will be:Code:hostname
Save your /etc/hosts file:<your_host_name>
Create a new /etc/hosts file:Code:sudo mv /etc/hosts /etc/hosts.ORIGINAL
And write as follow:Code:sudo gedit /etc/hosts
Save. Exit.127.0.0.1 localhost <your_host_name>
127.0.1.1 localhost <your_host_name>
4) Improve system with tmpfs (reduce I/O on disks)
Reboot the system. In red extreme settings.
Delete all temp stuff
Code:sudo rm -rf /tmpCode:sudo rm -rf /var/tmpCreate new temp stuff:Code:sudo rm -rf /var/log
Code:sudo mkdir /tmpCode:sudo mkdir /var/tmpEdit /etc/fstabCode:sudo mkdir /var/log
And add at the end of the file the following:Code:sudo gedit /etc/fstab
Save. Exit. Load tmpfs temp areas:#tmpfs
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
tmpfs /var/log tmpfs defaults,noatime,mode=1777 0 0
tmpfs /var/tmp tmpfs defaults,noatime,mode=1777 0 0
The extreme settings are referring to the fact that if you need the history of your logs (/var/log) you will loose them at every reboot; for /var/tmp I'm not so sure that is ideal for some stuff from KDE environment and/or KDE application (some hints needed).Code:sudo mount -a
5) Move Flash cache in tmpfs
If you complete the step 4), move Flash temporary files in tmpfs.
Close your browser, open a terminal and go to your home dir:
Delete Flash stuff:Code:cd $HOME
Code:rm -fr .macromediaSymlink Flash stuff:Code:rm -fr .adobe
Code:sudo ln -s /tmp .macromediaDone.Code:sudo ln -s /tmp .adobe
6) Firefox hotfix
Edit/create /etc/firefox/firefoxrc file
And write as follow:Code:sudo gedit /etc/firefox/firefoxrc
Save. Exit. Please, if you are not using Pulseaudio system comment out the red line (#)#Set pulseaudio as audio wrapper for Firefox
FIREFOX_DSP="padsp"
#Fix Firefox ARGB visual (flash)
export XLIB_SKIP_ARGB_VISUALS=1
#Disable PANGO in Firefox
export MOZ_DISABLE_PANGO=1
7) Use OpenDNS or Google DNS with DHCP
Edit /etc/dhcp/dhclient.conf
Add the following at the end of the file:Code:sudo gedit /etc/dhcp/dhclient.conf
Save. Exit. In green the DNS choose (GoogleDNS); you can comment it and uncomment the OpenDNS one, or you can comment both of them and use your provider DNS. Reboot needed upon any DNS change in order to get them operative.Code:#OpenDNS #prepend domain-name-servers 208.67.222.222, 208.67.220.220; #Google DNS prepend domain-name-servers 8.8.8.8, 8.8.4.4;
end) Reboot the system
At this point you can try initial performance tests and compare the results.
Enjoy!
Bookmarks