From owner-freebsd-current@freebsd.org Sat Aug 19 22:38:25 2017 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 513C0DEA277 for ; Sat, 19 Aug 2017 22:38:25 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 1C49467BD8; Sat, 19 Aug 2017 22:38:24 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id jCNkdNhLj8LPZjCNldRsFq; Sat, 19 Aug 2017 16:38:17 -0600 X-Authority-Analysis: v=2.2 cv=e552ceh/ c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=kj9zAlcOel0A:10 a=KeKAF7QvOSUA:10 a=VxmjJ2MpAAAA:8 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=817x76XfPrYHKY8HFoIA:9 a=CjuIK1q_8ugA:10 a=G089RR_qUdcA:10 a=7gXAzLPJhVmCkEl4_tsf:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id D69BE2003; Sat, 19 Aug 2017 15:38:15 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id v7JMcFci004579; Sat, 19 Aug 2017 15:38:15 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201708192238.v7JMcFci004579@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Mark Johnston cc: Cy Schubert , freebsd-current@freebsd.org Subject: Re: swapfile query In-Reply-To: Message from Mark Johnston of "Sat, 19 Aug 2017 14:31:49 -0700." <20170819213149.GA34140@raichu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 19 Aug 2017 15:38:15 -0700 X-CMAE-Envelope: MS4wfORGIHDqZcQI42E8F48TGE1sBG0hUI0o3ki+zE4PKDet+IyOgNvzVmr0KKQE58adLbObA8gKSiigDQCyKpbi3ngzkmi580iIvoP+cqINin2VE8dWn3RC zicHTedCEbhm/IuwdD3g41c3Rtk4JwBqdahlA5nCyjO9QLGE/OHXDnv/YGrnxo3sCadXn2C/pJswUcTVN089AqHVxvsIt1ABzvY= X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Aug 2017 22:38:25 -0000 In message <20170819213149.GA34140@raichu>, Mark Johnston writes: > On Sat, Aug 19, 2017 at 02:24:19PM -0700, Cy Schubert wrote: > > In message <201708192100.v7JL0vFk003935@slippy.cwsent.com>, Cy Schubert > > writes: > > > > > (On my -CURRENT laptop I see a scan rate in the hundreds on a totally idl > e > > > laptop and in the teens of my idle firewall. IMO this doesn't seem right, > > > > at least not compared to previous releases of FreeBSD or from the days wh > en > > > I worked on Solaris. You shouldn't see a scan rate on an idle system.) > > > > It appears that on an idle system with many pages in use, i.e. a laptop > > running X and not really doing anything else, pages are scanned though the > > system is idle. This is likely an artifact of r308474. > > It's an intentional consequence of r254304. The page daemon performs a > slow and steady scan of the queue of active pages and will gradually > move unreferenced pages to the inactive queue. This is certainly better. It's probably good idea to remove scan rate from vmstat output as it's not meaningful in the traditional sense any more. For example on a traditionally scanning VM system (Solaris or z/OS) the number of pages scanned per second (or unreferenced interval count -- the inverse of the scan rate) is the first indication that you need to look at your vm subsystem. As of r254304 rate cannot be used used as a metric any more except when one sees it deviate wildly from previous observations. (Not that I'm complaining.) See below: procs memory page disks faults cpu r b w avm fre flt re pi po fr sr ad0 da0 in sy cs us sy id 0 0 0 3.9G 292M 4 0 0 0 193 125 0 0 434 773 588 0 0 100 1 0 0 3.9G 292M 55 0 0 0 181 123 22 0 460 2467 1402 0 1 99 0 0 0 3.9G 290M 969 0 0 1 316 124 1 0 490 12571 4004 3 1 95 0 0 0 3.9G 289M 261 0 0 0 160 124 21 0 505 20426 7751 2 2 97 0 0 0 1.5G 755M 3481 0 1 1 60951 74 18 0 463 19918 6576 13 4 82 At this point I closed firefox. Pages are freed and scan rate decreases. We now have a new normal. 0 0 0 1.5G 752M 10 0 0 0 0 24 1 0 409 595 365 0 0 100 0 0 0 1.5G 754M 1 0 0 0 403 23 49 0 478 609 1321 0 1 99 0 0 0 1.5G 754M 19 0 0 0 171 24 0 0 402 655 382 0 0 100 0 0 0 1.5G 754M 0 0 0 0 170 24 0 0 423 568 463 0 0 100 0 0 0 1.5G 754M 0 0 0 0 174 12 0 0 403 627 359 0 0 100 0 0 0 1.5G 754M 0 0 0 0 172 35 4 0 425 625 474 0 0 100 0 0 0 1.5G 754M 1 0 0 0 170 24 4 0 416 651 398 0 0 100 0 0 0 1.5G 754M 0 0 0 0 163 23 1 0 426 655 490 0 0 100 0 0 0 1.5G 754M 0 0 0 0 176 23 0 0 429 663 384 0 0 100 0 0 0 1.5G 754M 0 0 0 0 163 23 0 0 445 661 482 0 0 100 Should we consider removing scan rate from vmstat output? It doesn't really mean anything in relation to tuning any more. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few.