Why is my swappiness set to 180 and what does that even mean?

So, I’ve been running out of memory recently with some heavier games used together with browser, then I decided to check swap usage, and this is what I got:

$ cat /proc/sys/vm/swappiness
180
$ sysctl vm.swappiness
vm.swappiness = 180

Why is it set to 180 by default and what does that value mean? All sources on this topic I could find say that swappiness value is percentage 0-100, how can I even reach 180% of RAM usage without swap in the first place? Or is this some kind of bug?

System info:

Operating System: Bazzite 42
KDE Plasma Version: 6.4.0
KDE Frameworks Version: 6.15.0
Qt Version: 6.9.1
Kernel Version: 6.14.6-109.bazzite.fc42.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 5800H with Radeon Graphics
Memory: 16 GiB of RAM (13.5 GiB usable)
Graphics Processor 1: AMD Radeon Graphics
Graphics Processor 2: NVIDIA GeForce RTX 3060 Laptop GPU
Manufacturer: LENOVO
Product Name: 82JU
System Version: Legion 5 15ACH6H

The value of swappiness is not a percentage. It’s just a value that determines how aggressive kernel will be in swapping out memory pages. The value had range 0-100 in kernel before version 5.8 and 0-200 in 5.8 and onward.

More here:

1 Like

Thanks, I asked ChatGPT and then briefly looked through some external source confirming the old range of 0..100, should have checked more thoroughly.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.