From owner-freebsd-arm@freebsd.org Fri Aug 3 07:02:26 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 1F0AF105F9EC for ; Fri, 3 Aug 2018 07:02:26 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic301-30.consmr.mail.ne1.yahoo.com (sonic301-30.consmr.mail.ne1.yahoo.com [66.163.184.199]) (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 AAF2A73C6A for ; Fri, 3 Aug 2018 07:02:25 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: nW4k5C4VM1mEbrpyiFIx_7SNLFPa_mfjJJ_4vKUS2eHS8TEJZFP2zETiohv7mXd FfcdzkXI7M4ZTpZD1Irorh4DVSpeDwCjU3aVVqGx0B3PMc.9MWlh97HqHINDftkR8sy3aYI71JdN C9ljT.yf5hcXMYZasZq1ML6wpACMbe4OStJ2FjqUWeSQi2UWE6PQrQQC_KSnGIShA8g6icmGLmPk OJveTl2cJaTLKL5pJaz3qYsKn.VJVaCquvRAuebOtVhs5gEE0ekJlQ0wRBMZ9ftZ8S_HAcZUyU3S bnyF.oVaRgXrU21AYnwcNIH6dF2594hf0s2olB0uvkj9tyy9WZU56YbdO8JQE4GMGk_fkuLP.ONS TTbyK16j9NtP2_F2..U.av31D2Xy1GhqnDOuQrzYonbXP0Ha.tMujDelHWKt_JPA78LJWSFNV9gk j7sRFgqGeDIo5U9dDxesda_ba4oLZgfDEXbEaqTlHD7WbBaT.Lh1fqRCw07xGWYdC57uTfiW7RoI IOiS2.OEwEKg8R2g186zU5qIYPrsQntt7vwp4Vxi_1U3mhj1e1KJQOhFT0sDmkPQ9BGGtja6AxgE NIyb5PP5ClkF.r1oS0D4dF8Ux03CR_nLA5xklMZ16fuYZviVZZsahHdyvDsh2v_vJtwQ72JNJaLP v5ZVFsA4u5ADJQK1TnQA0q7TtNYAO.z2JTPWh1Oc58KIS3y8.bR_0WupKxWPrKIlSxktLZWaCdJj ApN3NM5_KM67ESX8fyORHkTgq0kngQ4WZ70xXROSOmccks3ttTEnnh.Um_fNit0nb46wlVYTVnA2 KjNrZtgFPESehP0oXyp1lSlVEV2FSi2mkOT56VrwLwkBQ0dTR8VzDn_bue8x6EwtGKg8D6r57UvF LYNz_W9TgUiLCT6eaZwj4qj75578GLrqnIrauDSpggXPdD0hFitzmQa4P8cnfXvkrwKRT77w79XZ ZIOsW8Wl1d6XHuokNjqpjMCNZ9FSsGkQVZsJhzKVhFiFaRdP8XoLnSdTAR1k_mUywcWOJX5s8gUk pFI1FPON3G9kB Received: from sonic.gate.mail.ne1.yahoo.com by sonic301.consmr.mail.ne1.yahoo.com with HTTP; Fri, 3 Aug 2018 07:02:18 +0000 Received: from ip70-189-131-151.lv.lv.cox.net (EHLO [192.168.0.105]) ([70.189.131.151]) by smtp427.mail.ne1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID ca61e8ff55bceaa14ef998d11f6a35db; Fri, 03 Aug 2018 07:02:15 +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: <201808030034.w730YURL034270@donotpassgo.dyslexicfish.net> Date: Fri, 3 Aug 2018 00:02:13 -0700 Cc: markj@freebsd.org, bob prohaska , freebsd-arm@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <20180731153531.GA94742@www.zefox.net> <201807311602.w6VG2xcN072497@pdx.rh.CN85.dnsmgr.net> <20180731191016.GD94742@www.zefox.net> <23793AAA-A339-4DEC-981F-21C7CC4FE440@yahoo.com> <20180731231912.GF94742@www.zefox.net> <2222ABBD-E689-4C3B-A7D3-50AECCC5E7B2@yahoo.com> <20180801034511.GA96616@www.zefox.net> <201808010405.w7145RS6086730@donotpassgo.dyslexicfish.net> <6BFE7B77-A0E2-4FAF-9C68-81951D2F6627@yahoo.com> <20180802002841.GB99523@www.zefox.net> <20180802015135.GC99523@www.zefox.net> <201808030034.w730YURL034270@donotpassgo.dyslexicfish.net> To: Jamie Landeg-Jones 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: Fri, 03 Aug 2018 07:02:26 -0000 On 2018-Aug-2, at 5:34 PM, Jamie Landeg-Jones = wrote: > I've now added the log for vm stats for the failure with the usb 3.0 = 32 gb drive as swap. (3 partitions of 1GB) : >=20 > 15 minute output of swapinfo, gstat -abd -I 10s, sysctl vm, and syslog = up to the fail at: >=20 > http://catflap.org/jamie/rpi3/ Your examples seem to have the structure of not having much Inactive memory but having lots of swap space and then ending up trying to page out the Inactive memory until only 1 page is left --and then killing a process despite lots of swap space being available. Mem: 564M Active, 2M Inact, 68M Laundry, 162M Wired, 97M Buf, 104M Free Device 1K-blocks Used Avail Capacity /dev/mmcsd0s3b 4194304 78204 4116100 2% then: syslog: Aug 2 10:39:57 tiffany kernel: v_free_count: 3221, = v_inactive_count: 1 syslog: Aug 2 10:39:59 tiffany kernel: pid 30593 (c++), uid 0, was = killed: out of swap space and . . . Mem: 435M Active, 18M Inact, 81M Laundry, 167M Wired, 97M Buf, 198M Free Device 1K-blocks Used Avail Capacity . . . Total 3145728 182216 2963512 6% then: syslog: Aug 3 01:04:39 tiffany kernel: v_free_count: 2777, = v_inactive_count: 1 syslog: Aug 3 01:04:42 tiffany kernel: pid 31130 (c++), uid 0, was = killed: out of swap space syslog: Aug 3 01:04:42 tiffany kernel: v_free_count: 2775, = v_inactive_count: 1 syslog: Aug 3 01:04:42 tiffany kernel: pid 31225 (c++), uid 0, was = killed: out of swap space If Inact+Laundry+Buf(?)+Free was not enough to provide sufficient additional RAM, I'd would have guessed that some Active Real Memory should then have been paged/swapped out and so RAM would be made available. (This requires the system to have left itself sufficient room in RAM for that guessed activity.) But I'm no expert at the intent or actual operation. Bob P.'s reports (for having sufficient swap space) also indicate the likes of: v_free_count: 5439, v_inactive_count: 1 So all the examples have: "v_inactive_count: 1". (So: vmd->vmd_pagequeues[PQ_INACTIVE].pq_cnt=3D=3D1 ) =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)