Is maximum swap usage tunable?
bob prohaska
fbsd at www.zefox.net
Mon Mar 5 18:33:34 UTC 2018
On Mon, Mar 05, 2018 at 09:59:15AM -0500, Mike wrote:
> On 3/4/2018 11:57 PM, bob prohaska wrote:
> > On Sun, Mar 04, 2018 at 01:40:03PM -0800, bob prohaska wrote:
> >> make -j4 buildworld
> >[snip]
>
>
> I tried a buildworld using spinning rust for swap connected via USB"
>
> ========
>
> /usr/bin/make -j3 buildworld
>
>
> [lots of output omitted, can be supplied if needed]
[even more output omitted]
>
> -I/usr/src/contrib/llvm/tools/clang/include -I/usr/src/lib/clang/include
> -I/usr/src/contrib/llvm/include -DLLVM_BUILD_GLOBAL_ISEL
> -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS
> -DLLVM_DEFAULT_TARGET_TRIPLE=\"aarch64-unknown-freebsd12.0\"
> -DLLVM_HOST_TRIPLE=\"aarch64-unknown-freebsd12.0\"
> -DDEFAULT_SYSROOT=\"/usr/obj/usr/src/arm64.aarch64/tmp\"
> -ffunction-sections -fdata-sections -gline-tables-only -MD
> -MF.depend.Sema_SemaExprObjC.o -MTSema/SemaExprObjC.o -Qunused-arguments
> -I/usr/obj/usr/src/arm64.aarch64/tmp/legacy/usr/include -std=c++11
> -fno-exceptions -fno-rtti -gline-tables-only -stdlib=libc++
> -Wno-c++11-extensions -c
> /usr/src/contrib/llvm/tools/clang/lib/Sema/SemaExprObjC.cpp -o
> Sema/SemaExprObjC.o
>
> Killed
> *** [all_subdir_lib/clang/libclang] Error code 137
Error 137 was common on my system when USB flash swap was used,
but I don't recall seeing it when microSD swap alone was
in use and the system ran out of swap
>
[further snippage]
>
>
>
> >From /var/log/messages
>
> Mar 4 23:32:39 rpi3 kernel: pid 27325 (c++), uid 0, was killed: out of
> swap space
> Mar 4 23:32:54 rpi3 kernel: pid 27322 (c++), uid 0, was killed: out of
> swap space
> Mar 4 23:32:54 rpi3 kernel: pid 27387 (c++), uid 0, was killed: out of
> swap space
> Mar 4 23:32:54 rpi3 kernel: pid 24978 (make), uid 0, was killed: out of
> swap space
> Mar 4 23:32:54 rpi3 kernel: pid 757 (qmgr), uid 125, was killed: out of
> swap space
>
Make seems to take a while to figure out something's wrong... my system
behaves similarly.
>
> # swapctl -l
> Device: 1024-blocks Used:
> /dev/md99 1048576 13248
>
> =======
>
Was swapctl run during the swap shortage, or after? In my observation swap
seems to be freed very quickly once make gives up, a few seconds usually.
Catching the swap shortage at its peak seems to require either watchful
waiting at a top window or more clever logging than I know how to implement.
Running gstat into a log file records device activity, which is interesting,
but one still has to rake through the log.
>
> I plan to try again, same hardware but with 2GB swap space.
>
Please post what you learn...
bob prohaska
More information about the freebsd-arm
mailing list