From owner-freebsd-arm@freebsd.org Wed Feb 28 20:15:21 2018 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 710BFF42604 for ; Wed, 28 Feb 2018 20:15:21 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1a.eu.mailhop.org (outbound1a.eu.mailhop.org [52.58.109.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F0F138B693 for ; Wed, 28 Feb 2018 20:15:20 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 179786d4-1cc4-11e8-91c6-33ffc249f3e8 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound1.eu.mailhop.org (Halon) with ESMTPSA id 179786d4-1cc4-11e8-91c6-33ffc249f3e8; Wed, 28 Feb 2018 20:15:18 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w1SKFDV2081962; Wed, 28 Feb 2018 13:15:13 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1519848913.91697.387.camel@freebsd.org> Subject: Re: Is maximum swap usage tunable? From: Ian Lepore To: bob prohaska , Mike Cc: freebsd-arm@freebsd.org Date: Wed, 28 Feb 2018 13:15:13 -0700 In-Reply-To: <20180228185517.GB26187@www.zefox.net> References: <20180228170311.GA26187@www.zefox.net> <20180228185517.GB26187@www.zefox.net> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Feb 2018 20:15:21 -0000 On Wed, 2018-02-28 at 10:55 -0800, bob prohaska wrote: > On Wed, Feb 28, 2018 at 12:20:56PM -0500, Mike wrote: > > > > On 2/28/2018 12:03 PM, bob prohaska wrote: > > > > > > In watching system compilations on an RPi3 it looks as if the > > > system starts killing processes with "out of swap" warnings  > > > well below 50% of full utilization (in this case, 2 GB). One > > > recent instance of make -j4 kernel-toolchain killed llvm-tblgen > > > with only 34% of the swap in use. > > > > > > Is the maximum swap usage limit adjustable in any way? I didn't > > > recognize anything useful in the page at > > > https://www.freebsd.org/cgi/man.cgi?query=sysctl(8)&sektion=&manpath=freebsd-release-ports  > > > > > > It's possible the problem is really swap speed, rather than size, so I'd > > > like to try changing size limits if possible. The swap media claims 2-3  > > > MB/sec random write speed and observations with gstat seem to support the > > > claim, but transient stalls are hard to observe. An RPi2 with similar  > > > hardware seems to have no problems. > > > > > > > > > > > It's possible the problem is really swap speed > > I was running into swap speed / timeout issues.  There were messages on > > the console to that effect. > > > > Once I put the swap space on rotating rust, that part of the compile > > problem disappeared.  I use 1GB swap space. > > > The latest kernel versions seem to have largely done away with the > "indefinite wait buffobj" warnings. They're few and far between, > the compile proceeds unless they're abundant. The fact that armv7 > has no problem, and the system is reporting "out of swap" with 34% > in use strikes me as suspicious. Kernel and userland are in sync,  > so the figure of 34% swap usage is probably accurate.  > > Perhaps my question is better phrased thus: How does FreeBSD-arm  > determine when it's out of swap? > > Thanks for reading, > > bob prohaska You are reading too much into the phrase "out of swap". It doesn't mean literally "all sectors of all swapfiles are occupied with live data".  It just means "out of memory".  It can happen because it's unable to move more data to swap fast enough due to some short peak demand.  It can happen for other reasons too, like all disk buffers in use, or running out of resources to track the data in swap, or the system can't find any more pages eligible to be moved out to swap. It looks like the message that indicates swap space is truly full is   swap_pager: out of swap space Is that what you're seeing?  Or are you seeing processes killed with an out of swap space message? -- Ian