From owner-freebsd-arm@freebsd.org Tue Jun 26 05:24:44 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 6C95C101016B for ; Tue, 26 Jun 2018 05:24:44 +0000 (UTC) (envelope-from fbsd@www.zefox.net) Received: from www.zefox.net (www.zefox.net [50.1.20.27]) (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 C0B2C8007D for ; Tue, 26 Jun 2018 05:24:43 +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 w5Q5OqR6017812 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 25 Jun 2018 22:24:52 -0700 (PDT) (envelope-from fbsd@www.zefox.net) Received: (from fbsd@localhost) by www.zefox.net (8.15.2/8.15.2/Submit) id w5Q5OpHR017811; Mon, 25 Jun 2018 22:24:51 -0700 (PDT) (envelope-from fbsd) Date: Mon, 25 Jun 2018 22:24:51 -0700 From: bob prohaska To: Mark Millard Cc: freebsd-arm@freebsd.org, bob prohaska Subject: Re: RPI3 swap experiments, was Re: GPT vs MBR for swap devices Message-ID: <20180626052451.GA17293@www.zefox.net> References: <25F1A4BA-FBFC-4C32-85DD-5F5BA71A2B1A@yahoo.com> <20180620023253.GA89924@www.zefox.net> <1D86911D-20D1-494A-822B-1C07C5598CB1@yahoo.com> <10CAC122-399D-459E-9153-ABD7E753777E@yahoo.com> <20180623143218.GA6905@www.zefox.net> <03C2D3C4-6E90-4054-AF79-BD7FE2B7958D@yahoo.com> <20180624231020.GA11132@www.zefox.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jun 2018 05:24:44 -0000 On Sun, Jun 24, 2018 at 09:22:38PM -0700, Mark Millard wrote: > On 2018-Jun-24, at 4:10 PM, bob prohaska wrote: > > > > I've tried to replicate the RPi3 "run out of swap" experiment after > > updating source, kernel and world to r335576. Roughly the same things happen: > > Errors flood the console, when swap usage goes a bit over 80% the machine becomes > > unresponsive. No sign of the OOM assassin. > > > > However, -j4 buildworld got all the way to building libraries. With r334939 it > > always stopped in cross tools. That seems like a significant improvement > > in swap usage efficiency. Is this to be expected? > > > > >From the log file: > > http://www.zefox.net/~fbsd/rpi3/swaptests/r335576/1gbsdflash/buildworld.log > > is the text: > > --- buildworld --- > make[1]: "/usr/src/Makefile.inc1" line 299: SYSTEM_COMPILER: Determined that CC=cc matches the source tree. Not bootstrapping a cross-compiler. > make[1]: "/usr/src/Makefile.inc1" line 304: SYSTEM_LINKER: Determined that LD=ld matches the source tree. Not bootstrapping a cross-linker. > > So the cross compiler and cross linker were not built: the existing > llvm files were used. > Ahh, so it wasn't a massive performance increase.... too bad! > > > What details were captured can be seen at > > http://www.zefox.net/~fbsd/rpi3/swaptests/r335576/1gbsdflash/ > > in case they're of interest. > > > You are still using the drive that gets the errors ( /dev/da0 ), > even if it is not being used for swapping. > > http://www.zefox.net/~fbsd/rpi3/swaptests/r335576/1gbsdflash/console > > shows: > > _vfs_done():da0d[WRITE(offset=51819347968, length=131072)]error = 5 > g_vfs_done():da0d[WRITE(offset=51819479040, length=28672)]error = 5 > g_vfs_done():da0d[READ(offset=59586936832, length=32768)]error = 5 > g_vfs_done():vm_fault: pager read error, pid 823 (tcsh) Yes, I'm still using that same device. The errors attributed to /dev/da0 were reported nearly two hours after the system first reported distress. That makes it hard to believe the errors caused the problem. It's easier to see in a re-run of the same experiment, with the last two lines of /var/log/messages tacked on to the gstat and swapinfo log. The file can be found in http://www.zefox.net/~fbsd/rpi3/swaptests/r335576/1gbsdflash/2ndtest/ along with a pair of files sorted by read and write delay and a copy-paste of the top window after the power was cycled. The errors quoted above seem to start around timestamp Jun 25 19:54:28, but the system is clearly in trouble at timestamp Jun 25 17:58:55. OOMA never takes visible action which seems strange given the explicit getswapspace failures. Following timestamp Mon Jun 25 19:52:33 the log file becomes somewhat garbled. In looking through the log files of successful buildworlds there seem to be a random sprinkling of huge (~20 second) read and write delays, often clearing themselves in one or two 10-second sampling intervals. While they're certainly not good they weren't fatal. Thanks for reading, bob prohaska