Speeding up yourĀ UbuntuĀ is fun! That way, youāll get more performance out of your computer for free -4 Tricks to speed Up Ubuntu 14.X
There are several tweaks to make Ubuntu run faster. Some are quite safe, some are risky. Here youāll find only the safe ones.
I donāt likeĀ riskyĀ tweaks, because I think that stability and reliability are much more important than a little speed gain. Thatās why Iāve collected a couple of speed tips, that you can apply safely and with which you can make your Ubuntu run considerably faster in many cases.
Those tips are mainly how-toās that can be found elsewhere on this website as well, but scattered all over the site. Iāve bundled them on this page, that only deals with speed gain.
See our latest Blog:Ā Boost Up Your Ubuntu With 9 Different Ways
IāmĀ sureĀ youāllĀ be likeĀ to watch this video.
The absolute number 1: decrease swap use
1.Ā This is especially noticeable on computers with relatively low RAM memory (1 GB or less): they tend to be far too slow in Ubuntu, and Ubuntu accesses the hard disk too much. Luckily, this can be helped.
On the hard disk thereās a separate partition for virtual memory, called the swap. When Ubuntu uses the swap too much, the computer slows down a lot.
Ubuntuās inclination to use the swap, is determined by a value. The lower the value, the longer it takes before Ubuntu starts using the swap. On a scale of 0-100, the default value is 60. Which is much too high for normal desktop use, and only fit for servers. Decreasing this value on a desktop computer has no negative side effects whatsoever.
a.Ā First makeĀ sure that you have installed the applicationsĀ gksuĀ andĀ leafpad:
Click on theĀ greyĀ Ubuntu logo (Dash home). Query:Ā terminal.
Click on Terminal.
Type (or copy/paste):
sudoĀ apt-get installĀ gksuĀ leafpad
Press Enter and submit your password. Please note that the password will remain invisible, not even asterisks will show, which is normal.
b. Now check your currentĀ swappinessĀ value.
Type in the terminal (use copy/paste):
catĀ /proc/sys/vm/swappiness
Press Enter.
The result will probably beĀ 60.
c. To change theĀ swappinessĀ into a more sensible setting and improve the cache management, type in the terminal (use copy/paste to avoid typoās):
gksudoĀ leafpadĀ /etc/sysctl.conf
Press Enter.
Scroll to the bottom of the text file and add yourĀ swappinessĀ and cache parameters to override the defaults. Copy/paste the following lines:
#
# Decrease swap usage to a workable level
vm.swappiness=10
# Improve cache management
vm.vfs_cache_pressure=50
d. Save and close the text file. Then reboot your computer.
e. After the reboot, check the newĀ swappinessĀ setting:
Click on theĀ greyĀ Ubuntu logo (Dash home). Query:Ā terminal.
Click on Terminal.
Type (use copy/paste):
catĀ /proc/sys/vm/swappiness
Press Enter.
Now it should beĀ 10.
Note:Ā your machine might benefit from an even bigger decrease inĀ swappiness. A useful rule of thumb might be this:
1 GB RAM or more:Ā swappinessĀ at 10
Less than 1 GB RAM:Ā swappinessĀ at 5
For 768 MB RAM or less: enableĀ zRam
1.1. When your computer has very little RAM (768 MB or less), then of course your best choice is a lightweight member of the Ubuntu family, likeĀ Lubuntu. But even then the lack of memory will remain a problem, which will cause your system to slow down from time to time. Even when theĀ swappinessĀ has been decreased to 5.
In that case, you might achieve better results by enabling the experimental kernel moduleĀ zRam.Ā zRamĀ creates a compressed swap file in your RAM. The compression factor is the gain: with that, you āincreaseā your RAM.
Note: this hack might make your system unstable! So do not apply it on important computers.
The price you pay for this, is threefold:
ā Your processor (CPU) is being taxed more heavily, because itāll have to compress and decompress all the time;
ā When the system has filled the RAM swap, itāll start swapping on the hard drive as well. With a heavy burden: the chunk of memory that has been sacrificed for the RAM swap.
ā For the time being itās still an experimental module, so this extra layer of complexity might cause instability.
Thatās why, for the time being, I adviseĀ zRamĀ only for computers with very little RAM, and evenĀ thenonlyĀ in combination with aĀ swappinessĀ that has been decreased to 5.
Furthermore,Ā zRamĀ isnāt suitable yet for production computers, but only for test machines and other, non-essential computers.
You can install it as follows:
Click on theĀ greyĀ Ubuntu logo (Dash home). Query:Ā terminal.
Click on Terminal.
Type (use copy/paste):
sudoĀ apt-get installĀ zram-config
Press Enter. Type your password when prompted; your password will remain entirely invisible, not even dots will show, this is normal.
Reboot your computer.