Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Nov 2018 19:30:16 +0000
From:      RW <rwmaillists@googlemail.com>
To:        freebsd-hackers@freebsd.org
Subject:   Re: 13-CURRENT: several GB swap being used despite plenty of free RAM
Message-ID:  <20181118193016.094cca9d@gumby.homeunix.com>
In-Reply-To: <alpine.BSF.2.20.1811181752010.24142@puchar.net>
References:  <freebsd-hackers@freebsd.org> <F5ACF6D0-DBD7-416F-9AAC-7709771FE545@yahoo.com> <201811180154.wAI1smhg049214@slippy.cwsent.com> <CACc-My33oRg7eqjfDuEQU51inyydc66Hx%2B-DysqmdKyyMVVJsA@mail.gmail.com> <alpine.BSF.2.20.1811181752010.24142@puchar.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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. 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20181118193016.094cca9d>