Ubuntu swappiness

5,288

Solution 1

If you have enough memory, for e.g. your 4 gb, swappines will have no impact to system performance at all, because in that configuration most likely your system wont swap at all (or just to reserve mem-space). if you have few memory swappines may have impact to system performance. But its kind of a religious question with endless debates which value should be recommended. Alan Cox recommends a value near by 100. Other Kernel-Hackers recommends very lower values (the ubuntu default of 10 is often recommended). But from my experience it does not make a feelable difference in performance at all. So you could leave it by ubuntu default value (60) or choose the ubuntu recommended 10 for desktop systems.

Solution 2

Use this command to confirm that your change is being used (i.e., that it was saved permanently):

cat /proc/sys/vm/swappiness

Also, maybe the swap FAQ will help.

Share:
5,288

Related videos on Youtube

Viswanath Kuchibhotla
Author by

Viswanath Kuchibhotla

Updated on September 18, 2022

Comments

  • Viswanath Kuchibhotla
    Viswanath Kuchibhotla over 1 year

    I have a laptop with 4 GB RAM and i3 processor. It runs very fast when I use windows, but it keeps slowing down on my Ubuntu when I use it continuously. I noticed that 500mb+ swap is getting used even if only 20% of RAM is only used, and I have a doubt that this is the reason for the slowness. I have already set the swappiness value to 10. Then how else can I change it? I spend most of my time in Ubuntu so this is very important for me.