My space in the world

Code is poetry

Posted by Sayak
July - 11 - 2008

Reduce Swappiness
If your computer has 1GB+ RAM, you would be hardly needing your swap space in most cases. It is evident that the RAM is much faster than your hard drive (A good 677MHz DDR2 can give 3000+ MiB/s while a standard hard drive can give around 50MiB/s). So it’s better to let the RAM handle most of the processes. The tendency to use swap is called swappiness. Swap space is a cached area on the HDD that the OS utilizes as a memory overflow/dump area. To reduce swappiness, at a terminal, type in:
sudo sysctl -w vm.swappiness=10

If you wish to reduce the swappiness permanently, do:
sudo nano /etc/sysctl.conf

And change the vm.swappiness value to 10.

Using preload
Preload caches the most accessed applications on your disk and memory. Preload should not be installed on systems having memory less than 1GB, otherwise, it would not have any effect, or rather would advesly affect the performance. To install preload, at a terminal:
sudo apt-get install preload

Once installed, preload will automatically start during boot. It normally takes 20-30 launches of a program to start being cached by preload.

Disable unneeded startup services
Some services start-up automatically even if you don’t need them. Goto System->Administration->Services and press Unlock to provide your password for the keyring. You may disable services like Bluetooth, Logging and Printing services if you don’t need them.

Use lighter alternatives
You can use lighter alternatives to the existing programs you may use:

  • Firefox: Firefox has slightly higher memory consumption. You may use Opera or Epiphany as an alternative.
  • OpenOffice: You may use AbiWord and Gnumeric Spreadsheet as an alternative to OO-Word Processor and OO-Spreadsheet
  • Nautilus: You may use Thunar or PCManFM as an alternative.
  • Gnome-Panel: You can use FBPanel as an alternative.
  • Gnome-Terminal: You may use XTerm as a lighter alternative.

If you want to reduce RAM usage drastically, use a lite WM like Openbox and configure it to use Gnome apps. In that way, you can use all Gnome apps but you would use up very less memory.
Openbox configuration guide:

Disable unneeded ttys
Ubuntu comes with 6 ttys enabled. You usually don’t need more than 1 tty at a time. To disable tty2 to tty6:
sudo bash
cd /etc/event.d
mv tty2 tty2~
mv tty3 tty3~
mv tty4 tty4~
And so on till tty6.

Make OpenOffice faster in Ubuntu
Launch OO-Word Processor. Goto Tools->Options and click on Memory. From top to bottom on the window:

  • Reduce the Number of steps to 20
  • Set Use for to 128MB
  • Set Memory per object to 20MB
  • Set Number of Objects to 20
  • Check Enable systray Quickstarter

And press OK button.
Note: Enable the quickstarter only if you use OpenOffice extensively. Otherwise, the quick starter would be unneeded.

After performing these changes, do a reboot for the settings to take effect.

4 Responses to “Make Linux Faster and Smoother!”

  1. JGJones says:

    Some useful tips, thanks.

    For the swap space, I thought that the latest kernel autochange the swappiness on the fly depending on how it’s being used?

    If that’s the case, it might be better to leave that instead of forcing a fixed number?

    More info here –

  2. Sayak says:

    You may leave that out. Actually, the blog is mainly based on Hardy, which doesn’t have this feature yet. But I really doubt that swappiness would ever be autoregulated to values as low as 10.

    Very nice point raised, though.

  3. Arthur says:

    Memory consumption for Firefox 2 was higher than for some other browsers. But nowadays you’d have to use something like Dillo or links/lynx/w3m to beat Firefox 3 memory wise.

Leave a Reply

About Me

A son, brother and friend. Enjoys scripting and making small bits of apps here and there. Wants to conquer the world (well, who doesnt). A geek who has an obsession for ponies. Loves acoustic and wants to play guitar sitting on the Hollywood hill one day!

A Word About KDE

KDE is a versatile software compilation for all platforms. It is an intuitive and powerful desktop environment that focuses on finding innovative solutions to old and new problems, and creating a vibrant, open atmosphere for experimentation.