From owner-freebsd-arm@freebsd.org Tue Jul 31 20:50:05 2018 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 41D08106481B for ; Tue, 31 Jul 2018 20:50:05 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic317-20.consmr.mail.gq1.yahoo.com (sonic317-20.consmr.mail.gq1.yahoo.com [98.137.66.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BD0F87C1D4 for ; Tue, 31 Jul 2018 20:50:04 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: GHC41ZcVM1kJDg44jajtN9b1lH2KC0GVRL7gf6zYfGFk6JsCg_NQNJb9JaHm9dC A0wsHiRArVzT2s9JB5aHstOhJeufrX7tbi6KfIDBwySXuVMa4M9hybL8n0vHCAOhUyg3czTXZNu_ dA0VAFOqsHIjZYogdC8Vpdl.IcH5zLkf1wnnuu3gm7XgSsf30Pwn9hZkbkSJkP2no2SUK5mgCeq_ jjV_GbfOrfN3rEXTzRbxZQYk.E76YLZNb8tBvtkpGuQjje3eglwtJK4H1oRV6SGNL7CuC5OVt1S8 6Jn3fZk9CPuL7r.ABOiI07nJFMU9FNa9Qqk13niWEiGS09At33urQrrTwmvvBzCbm7FinVFWw5Ov wO_mBoKlx.x_kGDg5ZJEdl025VaQI9DNaef.ah50c9gL_2KJ8bG8NJjE4lXHSOMXIRPAhby1rB7v fcqpvMS8VCXw.tr5JlB9Dn5a7T3GpaF7iq8Hiva6oN4BImFUnwe_DEz_7zbFVZIq.uaW7LC3znmk 4r55DOFJngDvZsUICX2g97UtDuOYcYrWbEG9YcfPtY.iXEknUROOFDnRqeu9Xt8ppRwPgxYI8TVM AJjgkUAoqE1EJ3hhxNf4SFDoI5EhelXsbsprFqTonNI1AiF2DG07zqXlwSGv.DtXypiEOzP4gahz cEmBqlovu9YQfY07KMbHVsi7uBs7stOKd2VlVvhWeuFryJU0A8gsrnF7G4.aMFguwwHIC.ABdhfp CsfX619.8BH3fdyWOAHidSzmxuZFzlMcRaWMszH7VxWnAiRwUTG5d57AMNgMHGwQsvXNwpRsJrJo Q2L9mTnbIqJYtuYyBu2TNJ9dLa3oJudzbaAQbY3ddf.dS6MWFlNydw0v5iI2s6G33ZdfYMK3uXBI 8M1tqFpjAWcCsZ4bhsZz7g4eTij7kbi0E3T.cpGrSAm9Jr6Oh3.LjKIMprw_t3DmTyOEb_AefxVV EzzbRLTJ9.KYAKdZfapHT2B5hBXtlqDyKbJZYEaIrOZswkqbOPHVkBr6cg1nDmrYS9AmT1ABvncu kpUCkWxcoyg-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic317.consmr.mail.gq1.yahoo.com with HTTP; Tue, 31 Jul 2018 20:50:03 +0000 Received: from ip70-189-131-151.lv.lv.cox.net (EHLO [192.168.0.105]) ([70.189.131.151]) by smtp428.mail.gq1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID cab5d4f075e47a2e0c3fed8f8e295e25; Tue, 31 Jul 2018 20:49:58 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: RPI3 swap experiments From: Mark Millard In-Reply-To: <20180731191016.GD94742@www.zefox.net> Date: Tue, 31 Jul 2018 13:49:57 -0700 Cc: "Rodney W. Grimes" , freebsd-arm@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <23793AAA-A339-4DEC-981F-21C7CC4FE440@yahoo.com> References: <20180731153531.GA94742@www.zefox.net> <201807311602.w6VG2xcN072497@pdx.rh.CN85.dnsmgr.net> <20180731191016.GD94742@www.zefox.net> To: bob prohaska X-Mailer: Apple Mail (2.3445.9.1) X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jul 2018 20:50:05 -0000 On 2018-Jul-31, at 12:10 PM, bob prohaska wrote: > On Tue, Jul 31, 2018 at 09:02:59AM -0700, Rodney W. Grimes wrote: >>=20 >> An easy way of triggering OOM that I ran accross the other day is = simply: >> truncate -s 4G foo >> grep Anything foo >>=20 >> 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. >>=20 >=20 > 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.=20 >=20 > 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.=20 >=20 > One possibility is that my gstat logs are not accurate measurements of > storage activity. The logging script is >=20 > #!/bin/sh > while true > do gstat -abd -I 10s ; date ; swapinfo ; tail -n 2 /var/log/messages=20= > done >=20 > Does the script contain errors or omissions? A sudden change is easily possible (sub-second by far). The scripting technique is not good at providing real-time information that is fairly detailed over an interval just before the OOMA starts up to it having started. I'm not aware of a good way to get such information over such an interval. The best I'm aware of is to change the initiation of the OOMA kills to dump out the information that could lead to the OOMA-kill-needed classification. (This might not tell how it progressed to that point, which might also be needed. ) ["Change" here might just be enabling some existing debug mode for all I know.] > In the most recent case the worst delays were 15 seconds for read and = 38=20 > 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.=20 >=20 > 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. At this point we have no clue just what internal tracking leads to the initiation of OOMA kills: no clue just what would be involved/appropriate. > Some weeks (months?) ago there was a thread about swap being broken. = Was > that in any way related to what I'm seeing? There was some ZFS context stuff that seemed to be independent of UFS stuff relative to memory use. I continue to see reports tied to ZFS contexts. But I'm not sure if this is in any way related to what you are calling "swap being broken". I do not remember anything about swap being directly broken for swap partitions. (Swap files are a different issue and are problematical.) =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)