Date: Tue, 31 Jul 2018 12:10:16 -0700 From: bob prohaska <fbsd@www.zefox.net> To: "Rodney W. Grimes" <freebsd-rwg@pdx.rh.CN85.dnsmgr.net> Cc: bob prohaska <fbsd@www.zefox.net>, freebsd-arm@freebsd.org Subject: Re: RPI3 swap experiments Message-ID: <20180731191016.GD94742@www.zefox.net> In-Reply-To: <201807311602.w6VG2xcN072497@pdx.rh.CN85.dnsmgr.net> References: <20180731153531.GA94742@www.zefox.net> <201807311602.w6VG2xcN072497@pdx.rh.CN85.dnsmgr.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jul 31, 2018 at 09:02:59AM -0700, Rodney W. Grimes wrote: > > An easy way of triggering OOM that I ran accross the other day is simply: > truncate -s 4G foo > grep Anything foo > > grep(1) well gladly grow up to 4G trying to create a "line" of text > to search for the string "Anything". On a system with less than > 4G of free memory this triggers an OOM and starts killing processes. > If grep actually uses 4GB before OOMA kills it then maybe OOMA is working correctly. Naive reasoning wonders why it would take that much memory to find an eight-character string, but that's not germane here. Unless, of course, buildworld is using grep in a similar way. What I'm seeing is OOMA kills that happen when swap usage is low, swap paritions don't seem overwhelmingly busy and read write delays are far less than maximums observed for the session. One possibility is that my gstat logs are not accurate measurements of storage activity. The logging script is #!/bin/sh while true do gstat -abd -I 10s ; date ; swapinfo ; tail -n 2 /var/log/messages done Does the script contain errors or omissions? In the most recent case the worst delays were 15 seconds for read and 38 seconds for write, OOMA didn't act until two hours later, when swap usage was only about 130 MB and write delay to swap was 135 ms. That's what tempts me to think the kills are an artifact of some other behavior. This is why I'd like to see what happens if OOMA could simply be turned off or its trigger level adjusted. On a Pi, bogging down for a few minutes during a buildworld session is perfectly ok. I appreciate that an e-commerce server or cloud computing system is a different kettle of fish entirely. Some weeks (months?) ago there was a thread about swap being broken. Was that in any way related to what I'm seeing? Thanks for reading! bob prohaska
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20180731191016.GD94742>