From owner-freebsd-hackers@freebsd.org Mon Mar 1 16:23:26 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CD4475635F8 for ; Mon, 1 Mar 2021 16:23:26 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic307-55.consmr.mail.gq1.yahoo.com (sonic307-55.consmr.mail.gq1.yahoo.com [98.137.64.31]) (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 4Dq5Cx0Jq1z4tjK for ; Mon, 1 Mar 2021 16:23:24 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1614615803; bh=GPAgbuSEEj7lBi0PdVka+5CGK/Hlye4LHwjAZBn66cX=; h=X-Sonic-MF:Subject:From:Date:To:From:Subject; b=jxJnBYfFoJkKTT10+AdP5u3cDy+mSyybqM6m1tvnfhBlpf8+UmJFJvnkLNzkL/peYLw/1Q3m2iLZyizg/FFNq7wOn/7i0nCp9tEky95jdNpZqr3InVY9hbryeRuG/6EiejhOh58D3Q935xILDQEw/HqcaijnjC09iD/1sK743Zm1U9ChUEu0rFlR/Q/n/cOddfTg0QvMGl22Ph4S0x//zHkCor5qTqzCHVnNy0yf4R8R90jKsvfaiT0tecrziDnUr9hRuA77LCDXj4QwhnGs0eiQ6yp5dCzaD8N2LWD01EGNp9Lbq2YRmP6d3iAhP6TePuv/gztazcoI25oyPHAJdw== X-YMail-OSG: JNOhGWsVM1l8keCUNH5Ye1iy.mGH1ewFF1xWI1ehhGgYg2RPybW1eeIiYuwRGDE bhdClJu4YpOSnKinpu6apkJOZ_AnYtjKOnx0TZ6cq9bQxDxPqjYPf_ufL9rp05VWMn64GD1B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Ck14.Tguy1cjRdAbZFex9HAZD6FlcQ7pZOvXaBduId1AvaEs5._P.Qacd5y97p 0nmaek8YhvzM3P5EKqSk7xCdOet0xfLCKItVY55_56q5Ti9y1qm0E8.9ZcaYbG1FgmBSxMptS9LL Cgxt5IQWsI305jQzjiqnw71nolkxZ2X9bAw2j7Z7dneFghwXP7S7_m6tAdy4P8F2QYCM.iiy1tb. Lu2mTIG1DRNmjv3VezkUkdI2xuC6c3XiimMXA.HUFBd_b2.8bnwJONMOeL7sYrJk4a6FhuEt7yNo ZL9JE8QmmmS1GIYHNAxzQhdU- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic307.consmr.mail.gq1.yahoo.com with HTTP; Mon, 1 Mar 2021 16:23:23 +0000 Received: by smtp409.mail.bf1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID deb08ef632daa6c34c15f9cf13e3452a; Mon, 01 Mar 2021 16:23:19 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\)) Subject: Re: The out-of-swap killer makes poor choices From: Mark Millard In-Reply-To: Date: Mon, 1 Mar 2021 08:23:17 -0800 Cc: freebsd-hackers@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <132A65F3-E06A-40C1-8488-C421AD02F8F5@yahoo.com> References: To: tech-lists X-Mailer: Apple Mail (2.3654.60.0.2.21) X-Rspamd-Queue-Id: 4Dq5Cx0Jq1z4tjK X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.79 / 15.00]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[yahoo.com]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; DKIM_TRACE(0.00)[yahoo.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; NEURAL_HAM_SHORT(-0.29)[-0.289]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; ARC_NA(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[98.137.64.31:from]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; SPAMHAUS_ZRD(0.00)[98.137.64.31:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.64.31:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.64.31:from]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-hackers] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2021 16:23:26 -0000 On 2021-Mar-1, at 07:57, tech-lists wrote: >=20 > On Tue, Feb 23, 2021 at 01:49:49PM -0700, Alan Somers wrote: >=20 > [...lots...] >=20 > I've found that if I take a system already configured with swap, then > add say 2* 16GB swapfiles as per the handbook, enable the swapfiles, > that some things will use the swapfile and others not, even with = plenty > available in the swapfiles. >=20 > example: 12-stable amd64 system running poudriere. >=20 > it will use the swap configured by default (think it's 2GB) as a > partition. In this example, all of swap is on ssd - the partition and > both swapfiles. Compiling some things like rust or firefox will use = all > of the partition swap and some of the *swapfile* but not all of it[1]. = It's > almost like some processes have more of an affinity for swap as a > partition than others, and others won't use swap as a swapfile at all. >=20 > In the end, because I don't know how to debug this kind of issue > further, it was easier to blat the ssd and install 32GB of swap on > reinstallation of the OS. Swapfiles arent used now, on this particular > install. The 32GB swap partition is fine and works as expected. >=20 > Thought the above might be of use as I dunno, a data point. I wonder, > though, why some programs have seemingly more affinity for = swap-as-partition than swap-as-swapfile. >=20 > [1] by "not all of it" I mean fail with an OOM message before all of = the > swapfile is used See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D206048 for why swapfiles are problematical and likely should be avoided. In particular comments #7 and #8 that quote Konstantin Belousov on the subject (or reference his material). Part of the text says: As result, swapfile swapping is more prone to the trivial and = unavoidable deadlocks where the pagedaemon thread, which produces free memory, needs more free memory to make a progress. Swap write on the raw partition = over simple partitioning scheme directly over HBA are usually safe, while = e.g. zfs over geli over umass is the worst construction. =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)