From owner-freebsd-arm@freebsd.org Sat Sep 15 05:22:54 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 92A58109C8C5 for ; Sat, 15 Sep 2018 05:22:54 +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 C23F47F935 for ; Sat, 15 Sep 2018 05:22:53 +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 w8F58hwL065379 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 14 Sep 2018 22:08:44 -0700 (PDT) (envelope-from fbsd@www.zefox.net) Received: (from fbsd@localhost) by www.zefox.net (8.15.2/8.15.2/Submit) id w8F58hZA065378; Fri, 14 Sep 2018 22:08:43 -0700 (PDT) (envelope-from fbsd) Date: Fri, 14 Sep 2018 22:08:43 -0700 From: bob prohaska To: Mark Millard Cc: freebsd-arm@freebsd.org, bob prohaska Subject: Re: RPI3 swap experiments (r338342 with vm.pageout_oom_seq="1024" and 6 GB swap) Message-ID: <20180915050842.GA65045@www.zefox.net> References: <20180815013612.GB51051@www.zefox.net> <20180815225504.GB59074@www.zefox.net> <20180901230233.GA42895@www.zefox.net> <20180906003829.GC818@www.zefox.net> <20180906051520.GB3482@www.zefox.net> <059D2FED-6E7C-4FEF-8807-8D4A0D0B3E26@yahoo.com> <20180906155858.GA5980@www.zefox.net> <075BD4BB-CAFB-4C9B-809A-10901522D1ED@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <075BD4BB-CAFB-4C9B-809A-10901522D1ED@yahoo.com> User-Agent: Mutt/1.5.24 (2015-08-30) 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, 15 Sep 2018 05:22:54 -0000 On Thu, Sep 06, 2018 at 10:32:50AM -0700, Mark Millard wrote: > > It appears to me that for the devices that you are currently using, > you are better off for elapsed time having the swap only on the > sdcard. > In practical terms this seems true. I set up a 16 GB Sandisk Ultra Plus microSD card with a single partition for / and 1.8 GB of swap at the end, running r338572 with vm.pageout_oom_seq="1024". It finished -j4 buildworld successfully but ran out of space in buildkernel. 32 GB would have been far more than sufficient. There were many spurious "indefinite wait" and a few "out of swap" warnings on the console, but nothing came of them. A faster microSD card might have avoided the warnings entirely, the Ultra Plus isn't the fastest horse in the stable. I neglected to salvage the buildworld timing, but it was under 24 hours. Aftr moving /usr/src to a separate USB3.0 flash drive I repeated that test, adding experiments with swap on the same USB flash drive and swap on a second USB flash drive. All the tests succeeded, none sufficiently faster to justify the expense and complication of a second storage device. The log files are at http://www.zefox.net/~fbsd/rpi3/swaptests/r338572/ if anybody's interested. It might make sense to divide storage to protect valuable data from wearout, but I've not seen any evidence (knock on wood!) that wearout of flash media is a serious problem with the Pi. Setting up a physical swap partition by hand at the end of the microSD card is fairly difficult. If it could be automated through the machinery invoked by /firstboot that would be a useful feature. Thanks to all (Mark especially) for reading and guiding! bob prohaska