4 ms·
> How is it that Linux seems to grind to a halt when it is forced to swap /proc/sys/vm/swapiness or something like this. AFAIK shall be bigger than 50% to not
by hulitu 4y ago
> How is it that Linux seems to grind to a halt when it is forced to swap
/proc/sys/vm/swapiness or something like this. AFAIK shall be bigger than 50% to not see the behaviour that you describe.
- Manu40 4y agoAh yes, swapiness. I think Windows is set to something like ... 65% or so. Or was it 85%. I forget, but I looked into this a long time ago when I was having to suffer through having about half as much ram as was ideal for my use case scenarios on both windows and linux. I remember coming across some method to get it changed on windows as well, but I forget that method too. Or rather, I think it's some reg edit that needs doing, but I forget what/where.
- MrStonedOne 4y ago
- simoncion 4y agoBased on the explanation in the documentation <https://docs.kernel.org/admin-guide/sysctl/vm.html?highlight=swappiness#swappiness https://docs.kernel.org/admin-guide/sysctl/vm.html?highlight...>, I set 'swappiness' to 100. I figure that SSDs are fine with random IO, so swap isn't likely to be much -if at all- slower than pulling pages back in from disk.
- xani_ 4y agoWrong direction. Bumping swappiness up means OS will make it more likely to keep more pages in cache, setting it to higher value makes OS treat it more like RAM and that's usually slow and jittery
- derkades 4y agoUsing more swap may make the system faster. It means there is more room for file-backed pages in RAM, to cache read and writes. A swappiness value should be chosen based on the system IO workload and swap device performance characteristics.