Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Jan 2018 07:50:46 -0800
From:      Mark Millard <markmi@dsl-only.net>
To:        Poul-Henning Kamp <phk@phk.freebsd.dk>
Cc:        bob prohaska <fbsd@www.zefox.net>, FreeBSD Hackers <freebsd-hackers@freebsd.org>, Freebsd-arm <freebsd-arm@freebsd.org>
Subject:   Re: Builworld stalls on rpi2 [various processes stuck in pfault and vmwait with 1996M Free Swap listed by top]
Message-ID:  <3EDDDF6B-684A-436E-A2F5-3868BB279951@dsl-only.net>
In-Reply-To: <36827.1515834513@critter.freebsd.dk>
References:  <20180113005426.GA48702@www.zefox.net> <19904500-5819-47AC-9666-7103ED87C1CA@dsl-only.net> <36827.1515834513@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2018-Jan-13, at 1:08 AM, Poul-Henning Kamp <phk@phk.freebsd.dk> =
wrote:

> In message <19904500-5819-47AC-9666-7103ED87C1CA@dsl-only.net>, Mark =
Millard wr
> ites:
>=20
>>> Trying to self-host a build of r327859 using a GENERIC kernel at =20
>>> r327664, make seems to stall, with top showing

[That text is Bob Prohaska's, not mine.]

> In all likelyhood you do not have enough swap configured, getting
> through the llvm compilation takes insane amounts of VM these days.

As I remember, for the 1 GiByte of RAM that a RPi2B V1.1 has, the
boot sequence complains about having Swap: 2048M Total without
also adjusting some other defaults, reporting the intended maximum
is smaller. As I remember the figure it reports for the intended
maximum for the defaults was between 1.6 GiBytes and 1.7 GiBytes.
(I do not remember the detailed figure.)

[I assume a RPi2B V1.1 (cortex-a7) based instead of the cortex-a53
based V1.2.]

[An RPi3 with 1 GiByte of RAM and the aarch64 FreeBSD allows more
swap before complaining, something over 3.5 GiBytes of as I
remember.]

The interesting part of Bob's report was that top showed only
a little swap used at the time:

Swap: 2048M Total, 52M Used, 1996M Free, 2% Inuse

But it shows:

Mem: 527M Active, 16M Inact, 98M Laundry, 148M Wired, 86M Buf, 3272K =
Free

as well, apparently insufficient free memory to put the available
swap space to use? FreeBSD's head looks to need to be more aggressive
about swapping out so that it keeps enough free-space to allow
swapping to occur (at least for some types of contexts).

For reference, the pfaults and vmwaits listed by top were:

28760 root          1  52    0   346M   302M pfault  2  13:59   0.00% =
c++
28812 root          1  52    0   208M   167M pfault  2   2:54   0.00% =
c++
28815 root          1  52    0   212M   171M pfault  1   2:20   0.00% =
c++
28820 root          1  52    0   145M   104M pfault  1   2:00   0.00% =
c++
 593 root          1  20    0  8156K  1596K vmwait  1   0:04   0.00% =
sendmail
 590 root          1  20    0 10148K  1552K vmwait  1   0:02   0.00% =
sshd

> At the very least you can forget anything about make -j N for N>1

I made a similar suggestion.

I'll note that I've seen similar hangups with building large ports
after a bunch of other ports had already built. After rebooting
when I try again the build completes. So, it appears that the
prior activity helped work things into reaching the hung-up state.
(Fragmentation of some kind?)

In general it has been easier (and faster) to build things on the
RPi3 than on the RPi2B V1.1, despite both having 1 GiByte of RAM.
This suggests 32-bit address space or armv7 specific issues might
be involved.

=3D=3D=3D
Mark Millard
markmi at dsl-only.net




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3EDDDF6B-684A-436E-A2F5-3868BB279951>