Out of swap - NOT

Karl Denninger karl at denninger.net
Sat Feb 11 21:56:54 UTC 2017


On 2/11/2017 15:44, freebsd-arm at wynn.com wrote:
> On Sat, 11 Feb 2017 07:54:10 -0600
> Karl Denninger <karl at denninger.net> wrote:
>
>
> > In all probability it's really out.  Remember that RAM allocation has
> > to either come from physical RAM or swap.  If the requested allocation
> > cannot be made then you get this exact situation, and it happens
> > quickly enough that you won't see it most of the time with monitoring
> > tools.
>
> > What's probably biting you is temporary file space, which comes from
> > RAM since it's mounted on a ramdisk, and exhausts it.  I've run into
> > this same situation trying to build on a Pi2.
>
> > My recommendation? Connect a USB disk drive to the system and put a
> > swap partition on there. Or cross-compile (which is what I do) on a
> > nice big AMD64 box since that is MUCH faster.
>
> Greeting-
>
> I find it really hard to believe that I could be running out of swap,
> but I suppose as a test I can stick additional swap on my USB drive.
> There is already as I said 3xRam swap on the sd card.  Yes perhaps my
> pstat did not run at the exact right instant to see the OOM happen, but
> having started on PDP 11/70s running BSD 4.1 I have never seen a kernel
> build actually take that much memory.
>
> This exercise is not really about getting a new kernel built.  Yes I
> could cross on my Mac or one of my FreeBSD servers.  It is about
> beating on the system to see what it can do and how stable it is.  When
> last I beat on USB disks under FreeBSD ARM the disks would just
> disappear as far as the kernel was concerned.  So I see there is much
> improvement between 10 and 12.  
>
> This really begs the question how can my 586 at 133Mhz with 48M of ram
> and 96M  of swap build it's kernel (freebsd) and an arm box with more
> real ram and 3x swap gets OOM issues?
>
> -Brett
>
Where's your temp directory mounted?  By default that's usually on a
ramdisk (md) on these builds, and that will bite you in exactly this
fashion.

That's why I said to connect a USB disk drive; stick your temp (and swap
if you wish) on there and the problem should go away.

tmp on md is a wise selection for any device that has main storage on an
sd card as those things are both (very) slow and relatively fragile in
terms of writes.  However trying to buildworld/buildkernel there
requires a LOT of transient space and if you don't have it... boom-boom.

-- 
Karl Denninger
karl at denninger.net <mailto:karl at denninger.net>
/The Market Ticker/
/[S/MIME encrypted email preferred]/


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2993 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.freebsd.org/pipermail/freebsd-arm/attachments/20170211/76c1a6bb/attachment.bin>


More information about the freebsd-arm mailing list