June 17, 2013

Linux Hacks - 6 Tips to Speed up Ubuntu

6 Tips to Speed up Ubuntu


In this guide, I will try to introduce 6 tips that can be useful for those having old computers with low RAM and want to speed up their system for better performance. 

1) Preload

Preload is a daemon that runs in the background (invisible) that detects most used applications and store them in cache so that they can be called quickly, which will result in quick system load time.
Run this command to install Preload :
sudo apt-get install preload
Preload is already configured for use. But if you still want to configure it you can edit this file :
sudo gedit /etc/preload.conf

2) Disable Unnecessary Startup Applications

Some application startup when you log into Ubuntu.You can manage them through settings ,but you may have noticed many applications don't show up there. You , for example, may have installed Dropbox. It startup when you log into Ubuntu but can't see them in the Startup Application Settings.
To view these hidden applications, run this command :
sudo sed -i ‘s/NoDisplay=true/NoDisplay=false/g’ /etc/xdg/autostart/*.desktop

Now you can see more entries in the Startup Applications Settings.





Disable the applications that you don't think its necessary. Unchecking boxes will be a more good idea than removing them from the list as you can re-enable them later. Don't disable if you don't know what it does.


3) Adjust Swappiness

The swappiness value controls the Linux kernel’s tendency to swap – that is, move information out of RAM and onto the swap file on the disk. It accepts a value between 0 and 100.
  • 0: The kernel will avoid swapping process out of physical memory and onto the swap partition for as long as possible.
  • 100: The kernel will aggressively swap processes out of physical memory and onto the swap partition as soon as possible.



To check your current swappiness value, run this command :
cat /proc/sys/vm/swappiness
 The default value is 60, to change this, edit this file :
gksu gedit /etc/sysctl.conf
Look for vm.swappiness in the file and change its value. If it doesn’t exist, add it to the end of the file   on a new line, like so:
vm.swappiness=10
 Save your file and exit. Changes will take effect once you reboot your system.


4) Use TMPFS To Reduce Disk I/O

The /tmp folder receives a lot of hard disk read/write operations. You can simply use your system RAM instead of your hard disk to speed up read/write operations for the /tmp folder. To do this, you can follow these instructions:

- Open the terminal and edit the /etc/fstab file with this command:
sudo gedit /etc/fstab
- At the end of the file, add these two lines:
# Move /tmp to RAM
tmpfs /tmp tmpfs defaults,noexec,nosuid 0 0

Save your file and exit. Restart now your system to apply the new changes.


5) Use all CPU Cores For System Startup

If your computer is equipped with a multi-core CPU, you can configure your system to use all available cores during startup by following these instructions:
sudo gedit /etc/init.d/rc
- Search now for the first instance of this line:
CONCURRENCY=none
- And replace it with this one if needed:
CONCURRENCY=makefile
Save your file and exit.

6) Disabling Visual Effects

If your computer is a bit old, you can get rid of unwanted visual effects usingCompizconfig Settings Manager. To install it under Ubuntu 12.10/12.04, run this command:
sudo apt-get install compizconfig-settings-manager
Start it now and head to the Effects section, then disable all enabled effects:


That's it.


No comments:

Post a Comment