From owner-svn-src-all@freebsd.org Sun Apr 1 16:53:22 2018 Return-Path: Delivered-To: svn-src-all@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 1C713F6D400; Sun, 1 Apr 2018 16:53:22 +0000 (UTC) (envelope-from tijl@freebsd.org) Received: from mailrelay108.isp.belgacom.be (mailrelay108.isp.belgacom.be [195.238.20.135]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "relay.skynet.be", Issuer "GlobalSign Organization Validation CA - SHA256 - G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3C4FC74738; Sun, 1 Apr 2018 16:53:20 +0000 (UTC) (envelope-from tijl@freebsd.org) X-Belgacom-Dynamic: yes IronPort-PHdr: =?us-ascii?q?9a23=3AMn70IRQ8VBISfbMnBBoSsEyaY9psv+yvbD5Q0YIu?= =?us-ascii?q?jvd0So/mwa6zbRyN2/xhgRfzUJnB7Loc0qyK6/umATRIyK3CmUhKSIZLWR4BhJ?= =?us-ascii?q?detC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TW94jEIBxrwKxd+?= =?us-ascii?q?KPjrFY7OlcS30P2594HObwlSizexfb1/IA+qoQnNq8IbnZZsJqEtxxXTv3BGYf?= =?us-ascii?q?5WxWRmJVKSmxbz+MK994N9/ipTpvws6ddOXb31cKokQ7NYCi8mM30u683wqRbD?= =?us-ascii?q?VwqP6WACXWgQjxFFHhLK7BD+Xpf2ryv6qu9w0zSUMMHqUbw5Xymp4rx1QxH0li?= =?us-ascii?q?gIKz858HnWisNuiqJbvAmhrAF7z4LNfY2ZKOZycqbbcNgHR2ROQ9xRWjRPDI28?= =?us-ascii?q?cYUBEukPMuRWr4byu1QAogCzBRWuCe/z1jNEmmP60bM83u88EQ/GxgsgH9cWvX?= =?us-ascii?q?rKrdX1NqMSWv2r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X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2CcCADXDMFa/5nK8VFdFgYBAQEEAQEKA?= =?us-ascii?q?QGDQlMObxUTjDqMIgEBgXMxAV2SU4F6LoRhAoQkIjYWAQIBAQEBAQECAWoogjc?= =?us-ascii?q?kAYJJAQUnExwjEAsUBAklDyoeBhOFEQuwKDOIOoImBYl0gxRINIpDApc6CIVRi?= =?us-ascii?q?FJlVoNZhy6JFYgNIwEwgVJNMAiCfZBPPTCOAAEB?= X-IPAS-Result: =?us-ascii?q?A2CcCADXDMFa/5nK8VFdFgYBAQEEAQEKAQGDQlMObxUTjDq?= =?us-ascii?q?MIgEBgXMxAV2SU4F6LoRhAoQkIjYWAQIBAQEBAQECAWoogjckAYJJAQUnExwjE?= =?us-ascii?q?AsUBAklDyoeBhOFEQuwKDOIOoImBYl0gxRINIpDApc6CIVRiFJlVoNZhy6JFYg?= =?us-ascii?q?NIwEwgVJNMAiCfZBPPTCOAAEB?= Received: from 153.202-241-81.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([81.241.202.153]) by relay.skynet.be with ESMTP; 01 Apr 2018 18:52:10 +0200 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.15.2/8.15.2) with ESMTP id w31GqA15001530; Sun, 1 Apr 2018 18:52:10 +0200 (CEST) (envelope-from tijl@FreeBSD.org) Date: Sun, 1 Apr 2018 18:52:09 +0200 From: Tijl Coosemans To: Mark Johnston Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r331732 - head/sys/vm Message-ID: <20180401185209.17f65d95@kalimero.tijl.coosemans.org> In-Reply-To: <20180401162703.GD1440@raichu> References: <201803291427.w2TEReA3024929@repo.freebsd.org> <20180331202118.5401ed2a@kalimero.tijl.coosemans.org> <20180331225432.GB1440@raichu> <20180401172021.27852803@kalimero.tijl.coosemans.org> <20180401162703.GD1440@raichu> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Apr 2018 16:53:22 -0000 On Sun, 1 Apr 2018 12:27:03 -0400 Mark Johnston wrote: > On Sun, Apr 01, 2018 at 05:20:21PM +0200, Tijl Coosemans wrote: >> On Sat, 31 Mar 2018 18:54:32 -0400 Mark Johnston wrote: >>> On Sat, Mar 31, 2018 at 08:21:18PM +0200, Tijl Coosemans wrote: >>>> On Thu, 29 Mar 2018 14:27:40 +0000 (UTC) Mark Johnston wrote: >>>>> Author: markj >>>>> Date: Thu Mar 29 14:27:40 2018 >>>>> New Revision: 331732 >>>>> URL: https://svnweb.freebsd.org/changeset/base/331732 >>>>> >>>>> Log: >>>>> Fix the background laundering mechanism after r329882. >>>>> >>>>> Rather than using the number of inactive queue scans as a metric for >>>>> how many clean pages are being freed by the page daemon, have the >>>>> page daemon keep a running counter of the number of pages it has freed, >>>>> and have the laundry thread use that when computing the background >>>>> laundering threshold. >>>>> [...] >>>> >>>> I'm seeing big processes being killed with an "out of swap space" message >>>> even though there's still plenty of swap available. It seems to be fixed >>>> by making this division round upwards: >>>> >>>> if (target == 0 && ndirty * isqrt((nfreed + >>>> (vmd->vmd_free_target - vmd->vmd_free_min) - 1) / >>>> (vmd->vmd_free_target - vmd->vmd_free_min)) >= nclean) { >>>> >>>> I don't know where this formula comes from, so I don't know if this >>>> change is correct. >>> >>> Hm, that's somewhat surprising. This code shouldn't be executing in >>> situations where the OOM kill logic is invoked (i.e., memory pressure >>> plus a shortage of clean pages in the inactive queue). >>> >>> How much RAM does the system have? Could you collect "sysctl vm" output >>> around the time of an OOM kill? >> >> 1GiB RAM. I've sampled sysctl vm every 5s from the moment the process >> starts swapping until it is killed and uploaded that to >> https://people.freebsd.org/~tijl/sysctl/ > > Thank you. Now I agree with your change. Would you like to commit it? > I can take care of it if you prefer. Please go ahead. You can probably write a better commit log.