RPI3 swap experiments (r338342 with vm.pageout_oom_seq="1024" and 6 GB swap)

bob prohaska fbsd at www.zefox.net
Sat Sep 15 05:22:54 UTC 2018


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



More information about the freebsd-arm mailing list