You are not logged in.

#26 2021-11-14 14:50:29

Zod
Member
From: Hoosiertucky
Registered: 2019-03-10
Posts: 631

Re: Myths about swappiness and performance

For the record..I think.

Linus wrote:

/*
* From 0 .. 200.  Higher means more swappy.
*/
int vm_swappiness = 60;

Starting at line 174
https://github.com/torvalds/linux/blob/ … m/vmscan.c

Offline

#27 2021-11-14 15:00:08

seth
Member
Registered: 2012-09-03
Posts: 59,942

Re: Myths about swappiness and performance

https://github.com/torvalds/linux/commi … 4cb8c70ae2 indeed opened the config range w/o altering the calculation.

Offline

#28 2021-11-14 15:00:13

sabroad
Member
Registered: 2015-05-24
Posts: 242

Re: Myths about swappiness and performance

Zod wrote:

Why would I set swappiness over 100?

Good question, because it brings up _the_most_ prominent feature of kernel 5.8 to change page reclaim balance from predictive heuristics to being based on exact refault data:
https://kernelnewbies.org/Linux_5.8

This release base the LRU balance on the rate of refaults on each list, times the relative IO cost between swap device and filesystem (swappiness)

For scenarios where refaulting from swap may be orders of magnitude faster (cheaper) than refaulting from the filesystem - such as swap on ZRAM or filesystem on EBS (with swap on local SSD) - it may be useful to allow swappiness to

be raised up to 200 to force the kernel to use swapping

effectively the polar opposite of swappiness=0

Last edited by sabroad (2021-11-14 15:07:48)


--
saint_abroad

Offline

Board footer

Powered by FluxBB