Skip to main content

If you're running Ubuntu 12.04 Precise Pangolin on a machine with low memory you could experience issue with Ubuntu performance. It could become sluggish and slow. In this case Ubuntu accesses the hard disk often and it will impact the performance very much.

Swap partition is a separate partition on hard disk dedicated for virtual memory. The machine could slow down a lot if RAM memory recources are low.

- Advertisement -
- Advertisement -

However, you can easily tell Ubuntu how often to use the swap partition. This feature is called swappiness and it's determined by a value. The lower the value is, the longer it takes before Ubuntu starts using the swap partition instead phisical memory. This value could be between 0 and 100; Ubuntu has default value 60. It seems that this value is very high for normal use, and it could fit, at the first place, for server machines.

How to check swappiness value

1) Run terminal

2) Enter the command

cat /proc/sys/vm/swappiness

3) The result will probably be 60 (default value in Ubuntu for swappiness)

How to change swappiness value

1) Open file /etc/sysctl.conf in a text editor, e.g.

gedit /etc/sysctl.conf

2) Go to the end of the file

3) Enter the following parameter

# Decrease swappiness value

4) Save the file and restart the computer

Your computer should work now much faster using RAM memory more often instead a swap partition.

- Advertisement -