[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-arm
Subject:    Re: How to build packages on PBP ?
From:       Mark Millard via freebsd-arm <freebsd-arm () freebsd ! org>
Date:       2021-04-24 15:17:48
Message-ID: 8A9FBA4D-9BBD-4D67-ACE1-29F2BF91592F () yahoo ! com
[Download RAW message or body]

On 2021-Apr-24, at 03:33, KIRIYAMA Kazuhiko <kiri at truefc.org> wrote:

> On Thu, 22 Apr 2021 15:05:56 +0900,
> Steve O'Hara-Smith wrote:
>> 
>> On Thu, 22 Apr 2021 10:08:39 +0900
>> KIRIYAMA Kazuhiko <kiri@truefc.org> wrote:
>> 
>>> I'm tring to build packages for my desktop use on pineboookpro (PBP),
>>> but suddenly crashed during compiled devel/llvm10 and failed to build
>>> llvm10-10.0.1_5.txz. The reason why I guess was for too heavy to process
>>> to compile llvm10 because it's load average was over 6.0 !
>> 
>> 	It probably ran out of memory, try setting NO_PARALLEL=1 in the
>> environment and/or add some swap and try again.
> 
> Unfortunately also crashed with:
> 
> root@kazu:/var/ports/lpbpkx/devel/llvm90 # env NO_PARALLEL=1 make package-recursive
> 
> Swap is ready by 8GB:
> 
> root@kazu:~ # swapinfo -h
> Device              Size     Used    Avail Capacity
> /dev/mmcsd0p2       8.0G       0B     8.0G     0%
> root@kazu:~ # 
> 
> The situation before crash is like [1].
> 
> [1] http://www.truefc.org/~kiri/freebsd/pbp/IMG_1417.jpeg
> 

I recommend trying the following in, say, /boot/loader.conf 
and booting with the settings before attempting another
build:

#
# Delay when persistent low free RAM leads to
# Out Of Memory killing of processes:
vm.pageout_oom_seq=120
#
# For plunty of swap/paging space (will not
# run out), avoid pageout delays leading to
# Out Of Memory killing of processes:
vm.pfault_oom_attempts=-1
#
# For possibly insufficient swap/paging space
# (might run out), increase the pageout delay
# that leads to Out Of Memory killing of
# processes (showing defaults at the time):
#vm.pfault_oom_attempts= 3
#vm.pfault_oom_wait= 10
# (The multiplication is the total but there
# are other potential tradoffs in the factors
# multiplied, even for nearly the same total.)

Notes:

While I've never done anything that required it,
vm.pageout_oom_seq could be set even bigger.
Someone once reported using a figure like 1200
instead. No setting gives an unbounded delay.

If you decide to not use vm.pfault_oom_attempts=-1 :

For that last you would want to increase one or both
of: vm.pfault_oom_attempts and/or vm.pfault_oom_wait
instead of using 3 and 10 as the values.

If you do got (or get) one or more "was killed: out of swap
space" messages on the console: Be warned that the "out of
swap space" part can be a misnomer. Only if you also see
message(s) with text of the form
"swap_pager_getswapspace(...): failed" is the swap space
part of the notice the actual cause as far as I know. Other
causes include:

Sustained low free RAM (via stays-runnable processes).
A sufficiently delayed pageout.
The swap blk uma zone was exhausted.
The swap pctrie uma zone was exhausted.

The earlier tuning attempts to deal with the first two of
those, not the last two.

The 2 or 3 tunables above can instead be placed in
/etc/sysctl.conf if desired.

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

_______________________________________________
freebsd-arm@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arm
To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org"
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic