Pi3 out of swap at < 50%

Mark Millard marklmi26-fbsd at yahoo.com
Sun Feb 18 04:27:32 UTC 2018


On 2018-Feb-17, at 4:38 PM, bob prohaska <fbsd at www.zefox.net> wrote:

> . . .
> On my RPI2 running armv7 it looks like the out of swap error is real:
> 2 GB are configured, around 1.5 GB are usable (limited by internal table
> sizes) and I see "out of swap" with about 1.5GB usage showing in top.
> 
> . . .

If you are getting notices such as:

warning: total configured swap (524288 pages) exceeds maximum recommended amount (405460 pages).

then, quoting "man 8 loader" and its kern.maxswzone material,

                  Note that swap metadata can be fragmented, which means that
                  the system can run out of space before it reaches the
                  theoretical limit.  Therefore, care should be taken to not
                  configure more swap than approximately half of the
                  theoretical maximum.

is what that warning is about: Looking at the swapon_check_swzone code the
warning is reporting the "half" figure as "recommended", not reporting the
theoretical maximum. So, translating: "care should be taken to not
configure more swap than" the reported maximum recommended amount. (If I
understand correctly.)

You might well be better off with around 1.5 GiBytes of swap than with 2
GiBytes of swap for an RPI2. (405460 pages is about 1.54 GiBytes.)

> The best part is that a Pi2 running 11.0 managed to build world and kernel
> using 256 MB of md99 swap.  It was using j2, but that's the only difference.
> IIRC it took about three days.

The larger the -jN figure, the more swap is actually used at times. A good
test might be to try the old -j2 figure (or even -j1) and having about 1.5
GiBytes of swap: find a combination that works and then explore variations
from that base-case.

===
Mark Millard
marklmi at yahoo.com
( markmi at dsl-only.net is
going away in 2018-Feb, late)



More information about the freebsd-arm mailing list