My PC has swappiness set to 60.
cat /proc/sys/vm/swappiness
60
Even so, swap only occurred when the PC runs out of RAM. So, every time I fill the RAM, it stops responding for a while while it is swapping into its HDD.
I thought that with swappiness of 60, proximately 60% of (full size of) RAM would be mirrored on swap so it is already there when needed to be swapped out... But that is not what I am experiencing.
I've read the manual and many different answers here but none is about having swappiness on the right value and swap not occurring until the very last moment.
Contents of free -h
total used free shared buff/cache available
Mem: 15G 9,9G 266M 4,7G 5,4G 508M
Swap: 30G 3,2G 27G
swapon:
NAME TYPE SIZE USED PRIO
/dev/dm-1 partition 30,5G 3,5G -2