Or via the GUI,
Open a file manager (Thunar). Click on file system, then the folder /etc
sort by name, and scroll down to you find sysctl.conf.
Right click it and select edit as root ( a great tool built in MX)
You may have to supply root credentials (as any form of editing a system control file would need like some sudo nano syscntl.conf
Here is mine (the beginning of it...
Code: Select all
# /etc/sysctl.conf - Configuration file for setting system variables
# See /etc/sysctl.d/ for additional system variables.
# See sysctl.conf (5) for information.
#kernel.domainname = example.com
# Uncomment the following to stop low-level messages on console
#kernel.printk = 3 4 1 3
vm.swappiness = 1
And add the line vm swappiness=1, and save the file.
As you can see, I have mine set to one. You can try zero, but here is a wiki clip you can find in the mega-swappiness thread of days past.
but the data I found was
vm.swappiness = 0 The kernel will swap only to avoid an out of memory condition, when free memory will be below vm.min_free_kbytes limit. See the "VM Sysctl documentation".
vm.swappiness = 1 Kernel version 3.5 and over, as well as Red Hat kernel version 2.6.32-303 and over: Minimum amount of swapping without disabling it entirely.
vm.swappiness = 10 This value is sometimes recommended to improve performance when sufficient memory exists in a system.
vm.swappiness = 60 The default value.
vm.swappiness = 100 The kernel will swap aggressively.
With kernel version 3.5 and over, as well as kernel version 2.6.32-303 and over, it is likely better to use 1 for cases where 0 used to be optimal.