Linux Preformance Tweaks

This post just quickly explains how to tweak your linux distribution for better performance. Hope it helps.

Fix constant memory swapping

System swap settings are normally set too high on an initial kernal installation (unless the kernel has been optimised by yourselves.)
To check this setting run:

# cat /proc/sys/vm/swappiness

Standard kernels are set at 60, but I have found benefits to changing this to 10.

Change on the fly:

# sysctl -w vm.swappiness=10

To change permanently add the following to the file /etc/sysct1.conf:

# vm.swappiness=10

Disable virtual terminals that are not required

This procedure will increase system memory that is normally required for virtual terminals. Edit /etc/inittab and comment out the terminals that are not require. Make sure you leave a couple for emergencies though!

# vi /etc/inittab

example:

1:2345:respawn:/sbin/getty 38400 tty1
2:23:respawn:/sbin/getty 38400 tty2
3:23:respawn:/sbin/getty 38400 tty3
#4:23:respawn:/sbin/getty 38400 tty4
#5:23:respawn:/sbin/getty 38400 tty5
#6:23:respawn:/sbin/getty 38400 tty6

Speeding up OpenOffice on desktop machines

OpenOffice can take upto 30 seconds to open on some systems, this should speed it up. Another method is to pre-link OpenOffice with either Gnome or KDE.

Start OpenOffice.Org writer
Click Tools
Select Options
Click Memory
Set the options as follows (under graphics cache)
128Mb
20Mb
00:10

Speed up Mozilla Firefox

Mozilla is set to attach to a single HTTP object at a time when initially installed. make the following changes, and you will see a noticeable speed improvement.

Go to the following URL about:config and change these values

network.http.max-connections = 128
network.http.max-connections-per-server =48
network.http.max-persistant-connections-per-server = 12
network.http.max-persistant-connections-per-proxy = 24
network.http.pipelining = true
network.http.pipelining.max-requests = 30
network.http.proxy-piplining = true

Hard Disk Performance Tuning

IDE HDD’s can sometimes be configured incorrectly. Make sure that the changes you make here are compatible with the drive!!!!

hdparm -c1 /dev/hda (set IO to 32 bit)
hdparm -d1 /dev/hda (set DMA to on)

as ever, test before and after by running

hdparm -t /dev/hda

0 Responses to “Linux Preformance Tweaks”


  • No Comments

Leave a Reply