From owner-svn-src-head@freebsd.org Sun Apr 1 15:21:33 2018 Return-Path: Delivered-To: svn-src-head@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 AB3A3F54534; Sun, 1 Apr 2018 15:21:33 +0000 (UTC) (envelope-from tijl@freebsd.org) Received: from mailrelay109.isp.belgacom.be (mailrelay109.isp.belgacom.be [195.238.20.136]) (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 E255670BEE; Sun, 1 Apr 2018 15:21:32 +0000 (UTC) (envelope-from tijl@freebsd.org) X-Belgacom-Dynamic: yes IronPort-PHdr: =?us-ascii?q?9a23=3A0wNu8xb3wnBflsk9nNoXYbT/LSx+4OfEezUN459i?= =?us-ascii?q?sYplN5qZrsWybnLW6fgltlLVR4KTs6sC17KN9fi4EUU7or+5+EgYd5JNUxJXwe?= =?us-ascii?q?43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6arXK99yMdFQviPgRp?= =?us-ascii?q?OOv1BpTSj8Oq3Oyu5pHfeQpFiCazbL9oMBm6sRjau9ULj4dlNqs/0AbCrGFSe+?= =?us-ascii?q?RRy2NoJFaTkAj568yt4pNt8Dletuw4+cJYXqr0Y6o3TbpDDDQ7KG81/9HktQPC?= =?us-ascii?q?TQSU+HQRVHgdnwdSDAjE6BH6WYrxsjf/u+Fg1iSWIdH6QLYpUjm58axlVAHnhz?= =?us-ascii?q?sGNz4h8WHYlMpwjL5AoBm8oxBz2pPYbJ2JOPZ7eK7WYNEUSndbXstJWSJPAp2y?= =?us-ascii?q?YZYMAeUDM+ZXoJXyqVQVoBuiBwSgGP/jxiNUinPo26AxzuQvERvB3AwlB98Arn?= =?us-ascii?q?XUrNfxNKwP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V+Q=3D=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2AlCgBH+MBa/5nK8VFcFgYBAQEEAQEKA?= =?us-ascii?q?QGDQlMObxUTjDqMIgEBgXMxAV2SU4F6LoRhAoQkIjUXAQIBAQEBAQECAWoogjc?= =?us-ascii?q?kAYJIAQEBAwEnExwjBQsLFAQJJQ8qHgYThQUMC7AFM4g6giYFiXSDXDSKQwKXO?= =?us-ascii?q?giFUYhSZYtdiRWIDR4DM4FSTTAIgn2QTz0wjX4BAQ?= X-IPAS-Result: =?us-ascii?q?A2AlCgBH+MBa/5nK8VFcFgYBAQEEAQEKAQGDQlMObxUTjDq?= =?us-ascii?q?MIgEBgXMxAV2SU4F6LoRhAoQkIjUXAQIBAQEBAQECAWoogjckAYJIAQEBAwEnE?= =?us-ascii?q?xwjBQsLFAQJJQ8qHgYThQUMC7AFM4g6giYFiXSDXDSKQwKXOgiFUYhSZYtdiRW?= =?us-ascii?q?IDR4DM4FSTTAIgn2QTz0wjX4BAQ?= 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 17:20:22 +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 w31FKMBb001214; Sun, 1 Apr 2018 17:20:22 +0200 (CEST) (envelope-from tijl@FreeBSD.org) Date: Sun, 1 Apr 2018 17:20:21 +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: <20180401172021.27852803@kalimero.tijl.coosemans.org> In-Reply-To: <20180331225432.GB1440@raichu> References: <201803291427.w2TEReA3024929@repo.freebsd.org> <20180331202118.5401ed2a@kalimero.tijl.coosemans.org> <20180331225432.GB1440@raichu> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Apr 2018 15:21:33 -0000 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/ > I'm wondering if the higher inactive queue scan frequency after r329882 > might be responsible: OOM kills are performed after vm.pageout_oom_seq > back-to-back scans fail to reclaim any pages. Does your problem persist > if you increase the value of that sysctl, say to 60? This didn't help.