Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Aug 2018 15:40:21 -0700
From:      bob prohaska <fbsd@www.zefox.net>
To:        John Kennedy <warlock@phouka.net>
Cc:        freebsd-arm <freebsd-arm@freebsd.org>, fbssd@www.zefox.net
Subject:   Re: RPI3 swap experiments ["was killed: out of swap space" with: "v_free_count: 5439, v_inactive_count: 1"]
Message-ID:  <20180812224021.GA46372@www.zefox.net>
In-Reply-To: <20180812173248.GA81324@phouka1.phouka.net>
References:  <20180802002841.GB99523@www.zefox.net> <20180802015135.GC99523@www.zefox.net> <EC74A5A6-0DF4-48EB-88DA-543FD70FEA07@yahoo.com> <20180806155837.GA6277@raichu> <20180808153800.GF26133@www.zefox.net> <20180808204841.GA19379@raichu> <2DC1A479-92A0-48E6-9245-3FF5CFD89DEF@yahoo.com> <20180809033735.GJ30738@phouka1.phouka.net> <20180809175802.GA32974@www.zefox.net> <20180812173248.GA81324@phouka1.phouka.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Aug 12, 2018 at 10:32:48AM -0700, John Kennedy wrote:
> On Thu, Aug 09, 2018 at 10:58:02AM -0700, bob prohaska wrote:
> > ... I've gathered up what I've been given and put it in
> > http://www.zefox.net/~fbsd/rpi3/swaptests/tools/
> > in hopes it'll be useful. ...
> 
> Bob, are you doing anything clever to track/graph resources over time?
> 
The closest thing to clever is the logging script, started by Mark M., containing now
#!/bin/sh
while true
do  gstat -abd -I 10s ; date ; swapinfo ; tail -n 2 /var/log/messages 
done 

Output goes to a file, and sort can we used to sift out values of interest, for example
sort -n -u -k 5 swapscript.log > readdelay.sort 
will push the biggest ms/read values to the end of the file, where they can be examined.
Things like total swap can be fished out in a similar way, with some cruft in the output.
Then the values of interest can be located in the original file using a browser's find
feature, to see them in context. Error messages can be found the same way, though the 
presistence of stale messages can clutter the view signficantly. Timestamps, if present,
are usually a better way to match console errors to the log file.

The script surely isn't "lightweight", but in my case the crashes came before the script
and haven't changed much since it arrived. Still, you make a good point and I should do
a test occasionally to see if the script contributes to the crashes. I don't think the
script has ever been killed by OOMA. 


> I've got my box patched up to 12.0-ALPHA1 (r337589+2a27f5c34b07) + patches, and
> haven't seen any logged output (assuming it'll end up in /var/log/messages)
> although I'm certainly exercising things.  I typically beat things up with
> a buildworld-then-buildkernel.
> 
> Patches I've applied:
> 	http://www.zefox.net/~fbsd/rpi3/swaptests/tools/pageout.patch
> 	http://www.zefox.net/~fbsd/rpi3/swaptests/tools/slow_swap.patch
> 
> I haven't used the CAM_IOSCHED_DYNAMIC option or adjusted vm.pageout_oom_seq.
>
Setting vm.pageout_oom_seq to 120 made a decisive improvement, almost allowing
buildworld to finish. By the time I tried CAM_IOSCHED_DYNAMIC buildworld was
getting only about half as far, so it seems the patches were harmful to a degree.
Changes were applied in the order 

pageout 
batchqueue
slow_swap
iosched

My RPI3 is now updating to 337688 with no patches/config changes. I'll start the
sequence over and would be grateful if anybody could suggest a better sequence.
 
Thanks for reading,

bob prohaska




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20180812224021.GA46372>