Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 1 Jul 2018 08:08:17 -0700 (PDT)
From:      "Rodney W. Grimes" <freebsd-rwg@pdx.rh.CN85.dnsmgr.net>
To:        Trev <freebsd-arm@sentry.org>
Cc:        freebsd-arm@freebsd.org
Subject:   Re: RPI3 swap experiments
Message-ID:  <201807011508.w61F8HM5028540@pdx.rh.CN85.dnsmgr.net>
In-Reply-To: <8d9e3204-4975-435e-04eb-0fdecfbdcb6c@sentry.org>

next in thread | previous in thread | raw e-mail | index | archive | help
>  > Mark Millard wrote on 01/07/2018 16:42:
> > > On 2018-Jun-30, at 7:53 PM, bob prohaska <fbsd at www.zefox.net> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201807011508.w61F8HM5028540>