Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Jun 2018 23:20:20 +0300
From:      Volodymyr Kostyrko <arcade@b1t.name>
To:        Jeremy Chadwick <jdc@koitsu.org>, freebsd-stable@freebsd.org
Subject:   Re: lightly loaded system eats swap space
Message-ID:  <cee7a2f2-a986-98e6-0412-d0d15ff142e7@b1t.name>
In-Reply-To: <20180619172936.GA24967@icarus.home.lan>
References:  <20180619172936.GA24967@icarus.home.lan>

next in thread | previous in thread | raw e-mail | index | archive | help
19.06.18 20:29, Jeremy Chadwick wrote:
> (I am not subscribed to -stable, so please CC me, though I doubt I can
> help in any way/shape/form past this Email)
> 
> Not the first time this has come up -- and every time it has, all that's
> heard is crickets in the threads.  Recent proof:
…

I may sound lame but I also faced this issues a few month ago. After a 
few days of load system was trying to push more and more data into the 
swap up to the point that active window becomes too small to handle all 
programs so they should be get back from swap and while they are not 
running something pinches ARC and ARC claims the memory and so on…

I wasn't ever a fan of limiting things. If something requires limits it 
can be easily exploited. Should I switch from normal limits to other 
limits when I, say, need to test something on 4 VMs?

So while paging through documentation I found a rather old memo in 
tuning(7) about vm.swap_idle_enabled. I played a little with thresholds 
but that was only making things worse. I left swap_idle_enable on and 
let machine live. That was near January I suppose. To my amusement swap 
problems were gone. This doesn't mean swap wasn't used, instead system 
survived weeks under irregular load without issues. The only other 
change that I did was bumping up vfs.zfs.arc_free_target a little bit 
higher then default to make some space between ARC and VM so they 
wouldn't clash on memory so often.

Since then all of my problems with swap was forgotten. I'm not sure what 
setting fixed that, neither I'm sure that wasn't some recent patches. 
I'm running 11-STABLE and rebuilding system at least once per month.

Hope that can help someone. WBR.

-- 
Sphinx of black quartz judge my vow.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?cee7a2f2-a986-98e6-0412-d0d15ff142e7>