From owner-freebsd-arm@freebsd.org Mon Mar 5 18:33:34 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 971FAF45D14 for ; Mon, 5 Mar 2018 18:33:34 +0000 (UTC) (envelope-from fbsd@www.zefox.net) Received: from www.zefox.net (www.zefox.net [69.239.235.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "www.zefox.org", Issuer "www.zefox.org" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id E918F87D2F for ; Mon, 5 Mar 2018 18:33:33 +0000 (UTC) (envelope-from fbsd@www.zefox.net) Received: from www.zefox.net (localhost [127.0.0.1]) by www.zefox.net (8.15.2/8.15.2) with ESMTPS id w25IXWiP050434 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 5 Mar 2018 10:33:33 -0800 (PST) (envelope-from fbsd@www.zefox.net) Received: (from fbsd@localhost) by www.zefox.net (8.15.2/8.15.2/Submit) id w25IXW9a050433; Mon, 5 Mar 2018 10:33:32 -0800 (PST) (envelope-from fbsd) Date: Mon, 5 Mar 2018 10:33:32 -0800 From: bob prohaska To: Mike Cc: freebsd-arm@freebsd.org, bob prohaska Subject: Re: Is maximum swap usage tunable? Message-ID: <20180305183331.GB47820@www.zefox.net> References: <20180228214301.GA29481@www.zefox.net> <20180303162605.GA41874@www.zefox.net> <20180304182831.GA44154@www.zefox.net> <1520189171.38056.2.camel@freebsd.org> <20180304214003.GB44154@www.zefox.net> <20180305045723.GA47820@www.zefox.net> <637a406a-feba-23dc-be3c-d71d839503f7@mgm51.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <637a406a-feba-23dc-be3c-d71d839503f7@mgm51.com> User-Agent: Mutt/1.5.24 (2015-08-30) 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: Mon, 05 Mar 2018 18:33:34 -0000 On Mon, Mar 05, 2018 at 09:59:15AM -0500, Mike wrote: > On 3/4/2018 11:57 PM, bob prohaska wrote: > > On Sun, Mar 04, 2018 at 01:40:03PM -0800, bob prohaska wrote: > >> make -j4 buildworld > >[snip] > > > I tried a buildworld using spinning rust for swap connected via USB" > > ======== > > /usr/bin/make -j3 buildworld > > > [lots of output omitted, can be supplied if needed] [even more output omitted] > > -I/usr/src/contrib/llvm/tools/clang/include -I/usr/src/lib/clang/include > -I/usr/src/contrib/llvm/include -DLLVM_BUILD_GLOBAL_ISEL > -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS > -DLLVM_DEFAULT_TARGET_TRIPLE=\"aarch64-unknown-freebsd12.0\" > -DLLVM_HOST_TRIPLE=\"aarch64-unknown-freebsd12.0\" > -DDEFAULT_SYSROOT=\"/usr/obj/usr/src/arm64.aarch64/tmp\" > -ffunction-sections -fdata-sections -gline-tables-only -MD > -MF.depend.Sema_SemaExprObjC.o -MTSema/SemaExprObjC.o -Qunused-arguments > -I/usr/obj/usr/src/arm64.aarch64/tmp/legacy/usr/include -std=c++11 > -fno-exceptions -fno-rtti -gline-tables-only -stdlib=libc++ > -Wno-c++11-extensions -c > /usr/src/contrib/llvm/tools/clang/lib/Sema/SemaExprObjC.cpp -o > Sema/SemaExprObjC.o > > Killed > *** [all_subdir_lib/clang/libclang] Error code 137 Error 137 was common on my system when USB flash swap was used, but I don't recall seeing it when microSD swap alone was in use and the system ran out of swap > [further snippage] > > > > >From /var/log/messages > > Mar 4 23:32:39 rpi3 kernel: pid 27325 (c++), uid 0, was killed: out of > swap space > Mar 4 23:32:54 rpi3 kernel: pid 27322 (c++), uid 0, was killed: out of > swap space > Mar 4 23:32:54 rpi3 kernel: pid 27387 (c++), uid 0, was killed: out of > swap space > Mar 4 23:32:54 rpi3 kernel: pid 24978 (make), uid 0, was killed: out of > swap space > Mar 4 23:32:54 rpi3 kernel: pid 757 (qmgr), uid 125, was killed: out of > swap space > Make seems to take a while to figure out something's wrong... my system behaves similarly. > > # swapctl -l > Device: 1024-blocks Used: > /dev/md99 1048576 13248 > > ======= > Was swapctl run during the swap shortage, or after? In my observation swap seems to be freed very quickly once make gives up, a few seconds usually. Catching the swap shortage at its peak seems to require either watchful waiting at a top window or more clever logging than I know how to implement. Running gstat into a log file records device activity, which is interesting, but one still has to rake through the log. > > I plan to try again, same hardware but with 2GB swap space. > Please post what you learn... bob prohaska