From owner-freebsd-arm@freebsd.org Sun Jul 1 15:08:23 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 42BF5FF8FC4 for ; Sun, 1 Jul 2018 15:08:23 +0000 (UTC) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CD83E72898 for ; Sun, 1 Jul 2018 15:08:22 +0000 (UTC) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w61F8ISg028541; Sun, 1 Jul 2018 08:08:18 -0700 (PDT) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd-rwg@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w61F8HM5028540; Sun, 1 Jul 2018 08:08:17 -0700 (PDT) (envelope-from freebsd-rwg) From: "Rodney W. Grimes" Message-Id: <201807011508.w61F8HM5028540@pdx.rh.CN85.dnsmgr.net> Subject: Re: RPI3 swap experiments In-Reply-To: <8d9e3204-4975-435e-04eb-0fdecfbdcb6c@sentry.org> To: Trev Date: Sun, 1 Jul 2018 08:08:17 -0700 (PDT) CC: freebsd-arm@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII 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: Sun, 01 Jul 2018 15:08:23 -0000 > > Mark Millard wrote on 01/07/2018 16:42: > > > On 2018-Jun-30, at 7:53 PM, bob prohaska wrote: > [...] > >> It just crossed my mind that the successful -j4 buildworlds that used > >> USB swap (both mechanical and flash) separate from /usr and /var placed > >> the swap on a powered USB hub. It would be exceeding strange if that > >> proved helpful, but as things are going.... > > > Power issues have been mentioned before in this exchange, but it can be > > more like what one might notice with a oscilloscope than with a Digital > > Multi-Meter. If the device sometimes (even very briefly) requires more > > than the rpi3 provides (voltage or current) the device will likely > > fail sometimes despite a DMM not showing anything interesting. The > > same device might work fine on a powered hub that always provides > > sufficient voltage and current (on all time scales involved). > > > > I've had these sorts of situations before. Without a proper set of > > instruments to monitor for power problems with, it is a pain to > > figure out for sure if such is what is going on. > > > > So I tend to use a powered hub for USB storage. > > My RPi2B is connected to a pocket router via ethernet and USB for power, > and thence wirelessly to the wifi router at the fibre NTD. The pocket > router kept getting corrupted settings and losing connectivity. So I > replaced it. Same thing with the new one. I finally figured out that it > was a USB power issue - adding `max_usb_current=1` in the config.txt > file to double the current from 600mA to 1.2A fixed it. > > I hadn't considered power to be an issue for the RPi3B+ - it has a 3A > PSU (limited to 2.5A by the RPi's polyfuse) and does not need the The polyfuse is fast acting (ms to 10's of ms) when at 200 to 300% overload, typical acting time at labeled value is 4 hours, and at 20% overload (3A for a 2.5A device) is going to be between those values. Your power draw is not a nice flat line but fairly noisy and spikey, the pulse current allowed through a 2.5A polyfuse without tripping it is fairly significant so you are actually probably getting a good deal of that 3A's used. The RPI3 is known to be marginally at 2.5A if you use any power drawing USB devices plugged into the ports. > config.txt tweak as it already supplies up to 1.2A by default according > to an RPi Engineer: > https://www.raspberrypi.org/forums/viewtopic.php?p=930695#p930695 Well though the ports might be able to provide 1.2A, doing so would only leave 1.3A of power to run the board itself from a 2.5A supply and I really doubt that your gona run a buildworld -j4 on anything much less than 2A in use by the CPU and memory chips. > > Admittedly, I haven't been watching when "out of swap" occurs to see if > the red power LED goes out momentarily. However, since replacing the > 2.5A PSU with the 3A one I've not seen any red LED fade outs which used > to randomly occur with the 2.5A PSU. You can not see the noise on power signals with a LED, you need significant and somewhat elaborate test instrumentation, at a minimum a 100MHz, preferably faster, oscilliscope is needed. > > I'm currently -j4 compiling with an external USB hard drive connected to > a powered hub, so when that finishes, I'll add the USB memory key for > swap to the hub and see if it makes a difference. I would not even attempt to use more than one USB storage on a RPI3 without a powered hub, and if a powered hub was avaliable I would put all the storage behind that hub. Noisy power is a nightmare to trouble shoot without proper equipment. -- Rod Grimes rgrimes@freebsd.org