User talk:Cont999

From ArchWiki

Regarding swappiness in wiki page Gaming

According to [1] swappiness set to 0 does still swap, but only if it reaches the high watermark (basically full memory). Since MGLRU is coming out soon a swappiness value of 10 might be good for gaming so I will leave it at that. Just wanted to clarify. -- LukasF (talk) 18:52, 4 September 2022 (UTC)Reply[reply]

Really? That's interesting. 4 months ago I tested a swappiness value of 0 on the upstream linux kernel, but it disabled swapping completely and triggered the OOM killer instead. A value of 1 was the lowest it can go to allow swapping to happen. Then, after I noticed these new tweaks that got added to the gaming article, I tested again (with linux-zen kernel this time) and I got the same results. Not sure what's going on. I decided to change the value in the article so people don't accidentally freeze their computers when they run out of RAM, so I picked a value of 10 because it was mentioned in the Swap#Performance (while 40 was also mentioned), I'm not sure which value works the best, thus I think we should do more testing and benchmarking on this.
Since you're the one that added these tweaks in the first place, I think you have better judgement for which setting would work best for gaming. Please let us know what you think would be the best for the use with MGLRU, as it's going to be added to the linux kernel soon. The main candidates here are 1 because it's the lowest, and 10 or 40 because they were suggested in Swap#Performance. Cont999 (talk) 04:07, 5 September 2022 (UTC)Reply[reply]
On my system running with linux 5.19.5.arch1-1 and swappiness set to 0 and a 20GB swap partition I am able to fill RAM and load data into the swap space. So setting it to 0 does keep swap enabled on a standard kernel. Linux-zen might have swap disabled at compile time. If MGLRU comes the behaviour might change and I do not know what the optimal setting is. I am not a wizard and certainly welcome changes, especially if one can provide good reason because I am still lacking this in a few places in the article and seek to have it in a better shape. For example I am still uncertain whether or not to enable THP's because it certainly improves the average latency (which is throughput) and am unclear whether the worst case latency of THP's (with defragmentation disabled) is really all that bad. -- LukasF (talk) 16:15, 5 September 2022 (UTC)Reply[reply]