13-CURRENT: several GB swap being used despite plenty of free RAM

RW rwmaillists at googlemail.com
Sun Nov 18 19:30:21 UTC 2018


On Sun, 18 Nov 2018 17:53:52 +0100 (CET)
Wojciech Puchar wrote:

> why someone changes WELL WORKING swapping algorithm?
> 
> On Sun, 18 Nov 2018, Stefan Blachmann wrote:
> 
> > So I guess the unwillingness of the developer team to add an option
> > like "NoPreemptiveSwapping", which disables swapping out as long as
> > there is free physical memory available, is of psychological
> > nature.  
> 
> in FReeBSD 12 there is
> 
> vm.swap_idle_threshold2: 10
> vm.swap_idle_threshold1: 2
> vm.swap_idle_enabled: 0
> 
> 
> which works as expected and can be turned on or off as required.

The above settings are about process level swapping, i.e. the 
deactivation of whole processes, they don't control swapping in the
sense of paging out to the swap device.

By default process swapping is only used under extreme memory shortage,
setting vm.swap_idle_enabled=1 allows idle processes to be deactivated.
It's only really intended for some special cases like login servers,
which tend to have a lot of inactive shell and editor processes.

Changing those setting wont reduce swap usage, they may increase
it. 


More information about the freebsd-hackers mailing list