From owner-freebsd-arm@freebsd.org Sat Aug 4 13:41:39 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 023EF106BCB8 for ; Sat, 4 Aug 2018 13:41:39 +0000 (UTC) (envelope-from warlock@phouka1.phouka.net) Received: from phouka1.phouka.net (phouka1.phouka.net [107.170.196.116]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "phouka.net", Issuer "Go Daddy Secure Certificate Authority - G2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 8323477B58 for ; Sat, 4 Aug 2018 13:41:38 +0000 (UTC) (envelope-from warlock@phouka1.phouka.net) Received: from phouka1.phouka.net (localhost [127.0.0.1]) by phouka1.phouka.net (8.15.2/8.15.2) with ESMTPS id w74DeFuB074265 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Sat, 4 Aug 2018 06:40:15 -0700 (PDT) (envelope-from warlock@phouka1.phouka.net) Received: (from warlock@localhost) by phouka1.phouka.net (8.15.2/8.15.2/Submit) id w74DeFbv074242 for freebsd-arm@freebsd.org; Sat, 4 Aug 2018 06:40:15 -0700 (PDT) (envelope-from warlock) Date: Sat, 4 Aug 2018 06:40:15 -0700 From: John Kennedy To: freebsd-arm Subject: Re: RPI3 swap experiments ["was killed: out of swap space" with: "v_free_count: 5439, v_inactive_count: 1"] Message-ID: <20180804134015.GA30738@phouka1.phouka.net> References: <20180801034511.GA96616@www.zefox.net> <201808010405.w7145RS6086730@donotpassgo.dyslexicfish.net> <6BFE7B77-A0E2-4FAF-9C68-81951D2F6627@yahoo.com> <20180802002841.GB99523@www.zefox.net> <20180802015135.GC99523@www.zefox.net> <201808030034.w730YURL034270@donotpassgo.dyslexicfish.net> <201808040355.w743tPsF039729@donotpassgo.dyslexicfish.net> <8CC5DF53-F950-495C-9DC8-56FCA0087259@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8CC5DF53-F950-495C-9DC8-56FCA0087259@yahoo.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Aug 2018 13:41:39 -0000 On Sat, Aug 04, 2018 at 12:14:52AM -0700, Mark Millard via freebsd-arm wrote: > ... QUOTE: > The FreeBSD swap-out daemon will not select a runnable processes to swap > out. So, if the set of runnable processes do not fit in memory, the > machine will effectively deadlock. Current machines have enough memory > that this condition usually does not arise. If it does, FreeBSD avoids > deadlock by killing the largest process. If the condition begins to arise > in normal operation, the 4.4BSD algorithm will need to be restored. > END QUOTE. > > As near as I can tell, for the likes of rpi3's and rpi2's, the condition > is occurring during buildworld "normal operation" that tries to use the > available cores to advantage. (Your context does not have the I/O > problems that Bob P.'s have had in at least some of your OOM process > kill examples, if I understand right.) ... For what it's worth, when I was first getting my rpi3 up and running, tuning swap and rebuilding world+kernel it really seemed to favor killing off ntpd and then usually a cc during the build (which resulted in a recoverable fail as I had to restart the build process with NO_CLEAN=yes. This was using 12-current kernels. Bumping /tmp (tmpfs) up to 75M (from 50) and having a proper freebsd-swap (vs swap-on-UFS-file) (and perhaps a V30 SD card) fixed all of that. I still have to set TMPDIR=/var/tmp (disk, not tmpfs) during installworld beacuse it tries to strip at least one really big executable during the install and that'll break with <= 75M of /tmp.