0

To try and fix an issue, I set swappiness to as low as possible, a 0, and swap is still being used. Why?

Running free -m gives:

total        used        free      shared  buff/cache   available
Mem:            484         241           8          58         235         134
Swap:          1023          97         926
user8292439
  • 3,808

1 Answers1

5

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

mondjunge
  • 3,296