To try and fix an issue, I set swappiness to as low as possible, a 0, and swap is still being used. Why?
free -m gives:
total used free shared buff/cache available Mem: 484 241 8 58 235 134 Swap: 1023 97 926
Swappiness defines when swap is used.
For instance, swappiness of 40 defines to begin using swap when there is 40% of RAM left to use.
Swappiness of 0 defines swap is used when the RAM is full and 0% left to use.
To disable swap (totally not recommended as you could possibly end up with an unusable system), you run:
sudo swapoff -a