From owner-freebsd-arm@freebsd.org Mon Aug 20 15:57:41 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 1166D10732D5 for ; Mon, 20 Aug 2018 15:57:41 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic316-20.consmr.mail.ne1.yahoo.com (sonic316-20.consmr.mail.ne1.yahoo.com [66.163.187.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 DC09973AE9 for ; Mon, 20 Aug 2018 15:57:39 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: tdRqOfYVM1lX90XDpfFOxQfzMwj6rXOesuib77ZWg_Q0vXAa0BrWMUJpKLPmVg. aKxzUlOapTTyLt_FCO7JzYSPAuMyB8DVMcpnAxBGHR17NFc2P6VMZTcBidx0nQ3llEM1.g_n5Ot1 k1yO23525_STyK3mJu0ANwtL0C1NUGCo8esHbNL7H7wmgRbHbrraHpn4lmo4NjUBn3ZK6Dj2iHfv 08wF1pxHHndYUkgs99Vk.8vYsznwuQeVmJVw5l_rL7DfQmgJAcMXvoQhl7emUSC0zrxICUtBpfrl FnF9qzt_n17yxajwADq6Ay5gR6F84cNh2DfbKRL4CyXmPx.3.wQ7ENYr_5.rf3G5nvhAYu66bGly 6RjJufMVKyzmhGT4I7hHxY3S28yDaJaPB4fbKO4BEi8NZSQvHO4w.ntnkhpnkNNl2sG7PU7Llksr VrRf1DMY.EyvqFMkztWH5xtgMYpdiIryjGlE7yFb6uyzYOhoF6sAh9GVKTyPZQxjsnusHGK4MFI9 Ss4U6rJecEKc0XEpT7GTZtLqPr.Pm.z4Lm6YAIwaU_xBZrZ322E_i7uPTogcUMcVWnhUndUvkzS_ bUJazyBfU2yNBSRhYiB2pQ97U7IjXzhLq.DBK_rKDRoVEP5CVrJEMZoSjbW5xsNilatKu4wVA2LA vdYxky6ogUEyh.z6awc3pQpjTbLQOuUAYhNLuASkdeCK6qekdM.tCKa9zuXaRQhwUg.9NdYy5XwK 6hJGQALRmOJkC39XTT3vtaggThYOb8lGXaTeu5ZwavjlMRaeidWCCUsnA.f97LUIx_6bkzvMcYzI P0XTuEXZk13MwiBMkVH3vghRY_nOnCSiSrooE3jyvFEjXk1q_cPMyDuRNSUsXaQTMJWASfM4m4jQ MbDvFJSHtQV97VMmbX2S6Y3H9JBd6vx.5rKiX4Ufe_X1C6mnGrXy9fXJ_1e2cZla3VptoD0th5LT ZVanIFj1GbX_GSymUTmcrkZGNqisyJligtrdtNlvO.ppRa0g7t.wAwcgzrmxdU.dmX9xLEs6BvZu 4x39_nf7yZoZ. Received: from sonic.gate.mail.ne1.yahoo.com by sonic316.consmr.mail.ne1.yahoo.com with HTTP; Mon, 20 Aug 2018 15:57:32 +0000 Received: from ip70-189-131-151.lv.lv.cox.net (EHLO [192.168.0.105]) ([70.189.131.151]) by smtp409.mail.ne1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 6e44455c968ec062bba250d417564ee4; Mon, 20 Aug 2018 15:57:28 +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 ["was killed: out of swap space" with: "v_free_count: 5439, v_inactive_count: 1"] From: Mark Millard In-Reply-To: Date: Mon, 20 Aug 2018 08:57:26 -0700 Cc: bob prohaska , freebsd-arm , Mark Johnston Content-Transfer-Encoding: quoted-printable Message-Id: <6CF1F2FD-104E-4296-AB9C-74009C3ACA4B@yahoo.com> References: <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> <20180812224021.GA46372@www.zefox.net> <20180813021226.GA46750@www.zefox.net> <0D8B9A29-DD95-4FA3-8F7D-4B85A3BB54D7@yahoo.com> <20180815221728.GA59074@www.zefox.net> <9EA5D75D-A03F-4B25-B65E-03E93DE30130@yahoo.com> To: Warner Losh 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: Mon, 20 Aug 2018 15:57:41 -0000 On 2018-Aug-20, at 7:59 AM, Warner Losh wrote: > On Mon, Aug 20, 2018 at 8:00 AM, Mark Millard via freebsd-arm = wrote: >> . . . >> gstat tends to show things such as: >>=20 >> dT: 1.006s w: 1.000s >> L(q) ops/s r/s kBps ms/r w/s kBps ms/w d/s kBps = ms/d %busy Name >> 0 0 0 0 0.0 0 0 0.0 0 0 = 0.0 0.0| mmcsd0 >> 56 312 0 0 0.0 312 19985 142.6 0 0 = 0.0 99.6| da0 >>=20 >> where the ms/w and kBps are fairly stable but the Length >> of the queue length is widely variable. For the above it >> makes the likes of 56 writes queued * 142.6 ms/write (mean) >> [as an estimate] a rather large total time for the last >> of the queued writes to complete. (If I understand how >> to interpret the above.) >=20 > No. 142.6ms/write is the average of the time that the operations that = completed during the polling interval took to complete. There's no = estimating here. >=20 > So, at 6 or 7 per second for the operation to complete, coupled with a = parallel factor of 1 (typical for low end junk flash), we wind up with = 56 operations in the queue taking 8-10s to complete. 56 * 142.6 ms/w =3D 7985.6 ms =3D 7.985.6 s, near the low end of your = range. I do not see how my proposed multiplication is inappropriate as an = estimate of your range. I do not know that gstat gets the 56 and the 142.6 ms/w from the exact = same time frame/context. (It might well for all I know.) So I did not want to claim too much. > . . . > These numbers are consistent with the theory that the swap device = becomes overwhelmed, spiking latency and causing crappy down-stream = effects. If over the whole test gstat -pd never shows more than, say, 200 ms/w for its about 1 second intervals, how can there be large spiking of latency to beyond, say, 1 second? I supposed that if the USB device has multiple writes active at once and some complete quickly but others do not, then such could be the case. But this would not be "parallel factor of 1 (typical for low end junk flash)". For the below, I realize that the device is in use in a USB 2.0 environment, which means 3.0 specific features would not be in use. Still, it gives some context about the device. The USB device is USB 3.0 capable that can sustain around 400 MiByte/sec sequential writes when connected to a USB 3.0 capable connection. I even over-provisioned it by leaving a free-space partition. I think the controller might be a Silicon Motion SM2258XT flash controller and Asmedia 1153e for USB. I've had the device for some time but I looked up the current "specs" for the brand/model it was sold under. I can not claim things were the same back then. The specs indicate UASP compliant, NCQ support, as well as S.M.A.R.T support. As I remember that was true back then as well. =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)