Reduce swappines

michelsaey
  11 years ago
  12

The swap tendancy is way to high in Linux Mint.

You can reduce it by following these steps:

-open a terminal en type: cat /proc/sys/vm/swappiness

The tendancy is probably '60', what good is for servers but is to high for normal users

-type in terminal:  gksudo gedit /etc/sysctl.conf  (in mate you use pluma instead of gedit)

-add at the bottom of that text file, the following lines (copy and paste):

#
# Reduce the swap tendency
vm.swappiness = 10

 

-save the file and restart the computer.

 

The rule is:

1GB RAM or more: set the swappiness to 10

Less then 1GB: set the swappiness to 1

Comments
zaivala 7 years ago

OK, you MATE users who are too dumb to get the message...

You're opening your text editor to edit the file. If you have Gnome, that's gedit. If you have KDE, that's Kate.

For MATE, it's pluma. He already told you that. "-type in terminal: gksudo gedit /etc/sysctl.conf (in mate you use pluma instead of gedit)"

- type in terminal: gksudo pluma /etc/sysctl.conf

Not trying to be mean, but someone down there said "It doesn't work in
MATE" and it does if you call the right text editor.

Don't forget to reboot before you check to see if it worked.

Please pardon my grumpiness, my desktop just died and I'm too tired to rip it open and reset chips right now.


KiLLA 8 years ago

I consider this option is being ignored on Mint 17.1, i have it on netbook with 1GB RAM, swappiness is set correct way to 1 as "cat /proc/sys/vm/swappiness" shows.. When i use more than ~700MB RAM a huge SWAP PARTY makes netbook unusable.. This happened even when i got SWAP partition udefined = as there was none.. Previous version i have used here was Mint 15 which i say is the BEST MINT SO FAR and was able to use ~950MB of RAM set the same way.. The newer versions use too much CPU and RAM resources for the same result..
@Shankaraya: dont use nemo.. i tried to do a backup copy of android x86 source (20,1GB) and nemo was mega sloooow showing 1h30m to complete and fully used 1 CPU core (1 of 4).. it gets stuck on lots of small files.. GNOME COMMANDER did same job much faster only using less than 20% of 1 core and in ~30minutes..


rick1959 8 years ago

Excellent and simple, Thank You!


MagicMint 8 years ago

@Shankaraya: Fileroller has probably nothing to do with it. It looks more like a memory leak, a problem I can confirm, and which has been addressed (at least in cinnamon) according to http://segfault.linuxmint.com/2015/03/cinnamon-2-4-updates-coming-through/ :-)


Shankaraya 9 years ago

nemo got so slow after putting 200 gbyte on my 500gbyte hard disk with mint 17.1. Deleting fileroller and reducing swappiness to 10 (4gigaRAM) makes nemo much more fluent


shinegami 9 years ago

It worked in my Linux Mint 17.1. Thank you very much.


mctom 9 years ago

It would be a perfect tutorial if you wrote what are the expected gains from doing such a thing. I did this to conserve my SSD.
Anyway, thank you. :)


goldshirt9 9 years ago

in Qiana replace gedit with kate i.e
gksudo kate /etc/sysctl.conf

then follow the rest of the tutorial


c123 9 years ago

Dont work in Linux Mint 17 MATE


JuneKernel 11 years ago

1
Other than your opinion why is this prudent?

2
for installs TO usb flash?


Mintification 11 years ago

I do this for any Mint installs. Good tutorial :)