RPI3 swap experiments

Mark Millard marklmi at yahoo.com
Sun Jul 1 07:12:30 UTC 2018



On 2018-Jun-30, at 7:53 PM, bob prohaska <fbsd at www.zefox.net> wrote:

> On Sun, Jul 01, 2018 at 09:42:15AM +1000, Trev wrote:
>> bob prohaska wrote on 30/06/2018 01:51:
>>> On Fri, Jun 29, 2018 at 10:28:25PM +1000, Trev wrote:
>>>> 
>>>> Jun 29 20:20:35 rpi3 kernel: pid 66844 (c++), uid 0, was killed: out of
>>>> swap space
>>>> 
>>>> At the time of "out of swap" only 157M of the 4G swap was in use. The
>>>> 4GB swap partition is on a 4GB USB2 memory key (da1p1), everything else
>>>> is on the sdcard. There are no excessively long ms/w being recorded.
>>>> There are no USB or other related errors.
>>>> 
>>> 
>>> That's a little surprising, and disturbing. By my experience your setup
>>> should have run to completion.
>>> 
>>> Do you see a "too much swap" complaint? I don't know if it's a problem,
>>> but 4 GB of swap triggers one on my RPi3. 3 GB does not. 2 GB is enough
>>> to finish -j4 buildworld.
>> 
>> Jun 30 23:32:12 rpi3 kernel: pid 60735 (c++), uid 0, was killed: out of 
>> swap space
>> 
>> No go with 2GB (I deleted the da0p1 swap partition; destroyed da0; then 
>> remade it it with a 2GB p1; then rebooted - no "too much swap" 
>> complaints). Out of swap with 56M of 2GB used. And this was with make 
>> -j2 buildworld.
>> 
> 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.


> The other successful -j4 buildworlds put swap on the root microSD card.
> I'd rate that a harder experiment, even if there is free space on the card.
> My talents with gpart leave much to be desired. If you're properly gifted
> it might also be worth trying.
> 
> . . .



===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)



More information about the freebsd-arm mailing list