Reduce the usage of swap
Improve the usage of the your system memory by reducing the usage of swap. This can be done by the following system hack:
Open a terminal
Type (or copy/paste) the following command:
cat /proc/sys/vm/swappiness
The output of the above terminal command is a value that shows your current swap tendency. This value will probably be: 60.
Type (or copy/paste) the following command:
For distro's using gedit:
gksudo gedit /etc/sysctl.conf
For distros' using pluma:
gksudo pluma /etc/sysctl.conf
For distro's using leafpad:
gksudo leafpad /etc/sysctl.conf
A text file will be opened. Scroll to the bottom of this file and add the following text:
#
# Decrease swappiness value
vm.swappiness=10
For systems with a SSD drive make sure that swap is set to 1 independently of the amount of available RAM.
Save and close the file.
Reboot your system
Open a terminal and type (or copy/paste) the following command:
cat /proc/sys/vm/swappiness
The new value for the swap interval will now be 10. This value is more than enough for desktop systems.
Tip 1: Does your system has 512 MiB of system RAM? Then the new value can be 0 (zero)! With lower amount of memory installed, this might even give a better result then changing the swap tendency to 1.
Tip 2: The valu for swappiness can also be set with a single terminal command. Run this command only when you're familiar with running terminal commands!
Open a terminal
Run the following command:
sudo /usr/sbin/sysctl -w vm.swappiness=10
If you have swap installed on a SSD drive, run this command:
sudo /usr/sbin/sysctl -w vm.swappiness=1
Close the terminal
A reboot is not required.
Shrink the inode cache
Does your system have 1 GiB system RAM or even more? Then your system might benefit by shrinking the inode cache drastic. Follow the steps below to utilize this system hack for better memory usage:
Open a terminal
Type (or copy/paste) the following terminal command:
For distro's using gedit:
gksudo gedit /etc/sysctl.conf
For distros' using pluma:
gksudo pluma /etc/sysctl.conf
For distro's using leafpad:
gksudo leafpad /etc/sysctl.conf
In the text file that will be openend, scroll to the bottom and add the following lines:
#
# Improve cache management
vm.vfs_cache_pressure=50
Save and close the file. Reboot your system.
Cut down Grub time-out
This trick shows you how to cut down the Grub time-out to let your system boot faster. Normally, the Grub will be visible for a few seconds to let you choose the options available in the Grub menu. If you don't need these option or you just like to have your system booted up much faster you can cut down the Grub time-out. Below you can see how to cut down your Grub time-out:
Open a terminal
Type (or copy/paste) the following command:
For distro's using gedit:
gksudo gedit /etc/default/grub
For distros' using pluma:
gksudo pluma /etc/default/grub
For distro's using leafpad:
gksudo leafpad /etc/default/grub
Look for the following line:
GRUB_TIMEOUT=
To disable Grub, set the value associated with this line to zero (0). If you want to have the Grub on screen for a few seconds, change the associated value to i.e. 3 or 5
Save and close the file. Do not close the terminal
Now type (or copy/paste) the following terminal command:
sudo update-grub
Trim down your startup applications
This tip will also speed up the boot process and/or login procedure of your Linux installation. Check your startup manager for applications you really don't need or just don't use. For instance, you could remove/disable the Bluetooth manager from your startup manager if you don't use Bluetooth.
A great tool to help you with this selection is an application called BUM which stands for Boot Up Manager. This tool shows all applications and daemons running in the background. This makes it easier for any user to select the daemons and applications which aren't needed. To install BUM, just run this terminal command:
sudo apt-get install bum