From nobody Sun Feb 26 05:20:24 2023 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PPX5f3RQhz3rsqZ for ; Sun, 26 Feb 2023 05:20:38 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic305-19.consmr.mail.gq1.yahoo.com (sonic305-19.consmr.mail.gq1.yahoo.com [98.137.64.82]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4PPX5d2pz0z3xMq for ; Sun, 26 Feb 2023 05:20:37 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=LzLun6u3; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.64.82 as permitted sender) smtp.mailfrom=marklmi@yahoo.com; dmarc=pass (policy=reject) header.from=yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1677388835; bh=OsTMbWXNejlt65+2OnQF27q9AnmWiz3NbEwO+dul8JY=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=LzLun6u3WK4HR+sXOUPjFLovPTGKTBV3ceqJttHY2mu+o/6nCFxKs4uL4+6aL4sPDhrBQkoQOC0MjPmW4Mt+WhHJVr/QB8Ck/u3HFIfDASbS5vbyQOvsHBc3HMqBOeWInkbA7KzmRGRxXFXCcnE+BuLE1cSAhLfW5xP0/A95HttCdrAzPeLhzHN502H7AA0mbVih9KkosIkHat2+DY8NNsPyp4kcFXLzQWGBvIyDTH2mBo22EZ2nMy+lkKCJQRVX4ZmkaIlzeZOkLXmP409QbaNx+/cOLkA6XSiVpLONTUxAeaczAVthVs55QkZCVskFRzDklm4y0bgSYqa3nnr50A== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1677388835; bh=WbVdVdYIhIyWhI0nKmbO2O6M+OJz6QAKMT0zj+9p6FX=; h=X-Sonic-MF:Subject:From:Date:To:From:Subject; b=siM5rQvb/+3ceXelPcvZaj2BUt7T5i1AuG00pH8nUF4Sj7yso+qjhFfsg4EdcNT1ZvAYPlZlXBKcEuvEu3oNT//9yms5xV7/RpMq9WmyDzQ5gTcCdo3NcTKfzyF6o6fH2ggU/jIyHXW2fiLboal/ns5O66m8GzEQnJKfdxd1pQoGW7knyzqFb6YZCSFAww+F92q/SnNbxAyxcGTeeqZoP7njayEUwcq1YiN3yStsVsgn5BlA8HW2HdGxn1HxDpIozO2DY/6Th5GGR4a/d5jq50TMyNjqXEBae+l67yr2z1pVUSLvGq8/JJdpSUM1uTkYCP3kL0JLiHZ8REIj+0YPXQ== X-YMail-OSG: ivcCZ0kVM1mQcIZAPWXkFAjd8JhFHDH..UN7vwm6q41ur83tbmQh0FYNMmOQ99G sfr_U4GvdQfUvgYZG0OQMQYhyhESqqV33XuUL64tW57TnwtOi65F1bJyc1H4AAXC3fFMhGhHDlPf iZbzsgmOYntiOzahYYRcT206UcibAPbsna0BqnJi7.uG87OpwLt2dcEXkcpnJvMrdLYkOmQ_6IJ3 c9w8yiXokeb9qgKR36el_2QbHM_8ADgNvaJmnJ77wZTFKEkRUhTtwkZDsSxVTHUvzkoKuwB1tO2O hl02RfmKKo.TMGFaInHS04Ym4RRwoJImWxxidVyvr_J_cCZdYFEXuaR5T1ukfQktefBdG65xoGez l3TAnygOQB7lHPWnSJx9Z8xac4r60_75pA4sEOueEXAeR.0AHDx9YjAJYTBpnDuUdNSe9i2Lo3q5 cFIZb0qhlhrUuPkC94zPiBQ1GzbkKlYyUWIMxHH_GKax6d7wzuOvHyVlOsyGb.dC.KRT6t_UJK7O sTCe83j.Ys00cM3gR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_caEqSZVMj_.SLSf1IJt8fA35p3tAQEV Kc6yU8mo.2Bjq8aP6DGbkoh7f9m9DjeAimHbrqQILZRLcdQL.o1Ay3.8I1zdWjkKToHEXZAYARXT KjeA0..jUN6D64_ng3UkFdn2DfNxKmDfNCWHsEPEzDaBbw7knGvDppJoNElc7NUkuS1vVw1wSENA liN_OjXQiLnKyAqypXb0DAq4q6S8kzkFAGUKGkMWgss4Cd2T2OL2fmzodnc0k12C1Eioue0RrqTt 0JgM6ksbssnfN7KyEoEWuiNz7QaPH8EwjYYnslk.7WRPvMzh9ibB9ym56IJSLlGcEIW4I1GIWa2R FgnkBvNfPL2EgQ4kmzwDTuxXS6_n93dZPjBOifTeIdOFTJ4dyEG5Zc7esWhL.pi0.t8.sCSUT_dE 7T5deUb.tvng26hSk3sSt8JB9DYLEjKAZI6MqkCLl6e3UxcB6yM2pBhVx9.ky9CDcR968dcSGpKF FtFQCSsIpFqtQQ9kN03lOlcXzXiUh4NEDmbiqWTOQHvvkKUMyf4y6VjLA39lysSvelLjTFpNe4JX KJW0YoFkgJ_vbRiWADjCfmjhKVT1g2eOYV7_oEw3Bt9626nL.vTRusSEKCdFuJHGnJSCTllcLLfc zaBbBQMBPQtyGaWfZJWBWhCjEeKGo3fr5pbP2CevvhAOTT1r262PJf_wtJmKcY3k6mgGsp1Ua X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic305.consmr.mail.gq1.yahoo.com with HTTP; Sun, 26 Feb 2023 05:20:35 +0000 Received: by hermes--production-gq1-655ddccc9-czwwz (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID cd8982fc88ff5a19a5dbcb61c6cd7244; Sun, 26 Feb 2023 05:20:35 +0000 (UTC) Content-Type: text/plain; charset=us-ascii List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.400.51.1.1\)) Subject: Re: An idea for swap partition size vs. swap space size in use handling From: Mark Millard In-Reply-To: Date: Sat, 25 Feb 2023 21:20:24 -0800 Cc: phk@phk.freebsd.dk, "freebsd-current@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <98459520-A9A0-430F-B32C-AE2FB30C12E8@yahoo.com> References: <202301220717.30M7H7wC022099@critter.freebsd.dk> <6F24FD22-ED7B-44E2-B6A6-C82F845C3A56@yahoo.com> <202302260402.31Q41xdI097098@donotpassgo.dyslexicfish.net> To: Jamie Landeg-Jones X-Mailer: Apple Mail (2.3731.400.51.1.1) X-Spamd-Result: default: False [-3.50 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.997]; MV_CASE(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; RCVD_IN_DNSWL_NONE(0.00)[98.137.64.82:from]; FREEMAIL_FROM(0.00)[yahoo.com]; TO_DN_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_LAST(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; MIME_TRACE(0.00)[0:+]; MLMMJ_DEST(0.00)[freebsd-current@FreeBSD.org] X-Rspamd-Queue-Id: 4PPX5d2pz0z3xMq X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N On Feb 25, 2023, at 21:00, Mark Millard wrote: > On Feb 25, 2023, at 20:01, Jamie Landeg-Jones = wrote: >=20 >> Mark Millard wrote: >>=20 >>> On Jan 21, 2023, at 23:17, Poul-Henning Kamp = wrote: >>>>=20 >>>> Last I looked at that code, that is precisely what happens >>>> if you add a too big swap-device ? >>>=20 >>> It produces a notice reporting how much bigger what it is >>> using is than what is recommended, if I understand the >>> message right. Here is an example were the difference was >>> small for an armv7 context: >>>=20 >>> warning: total configured swap (1003519 pages) exceeds maximum = recommended amount (1003072 pages). >>>=20 >>> Another from a context with a much bigger difference: >>>=20 >>> warning: total configured swap (2097152 pages) exceeds maximum = recommended amount (916632 pages). >>>=20 >>> These sort of messages are followed by: >>>=20 >>> warning: increase kern.maxswzone or reduce amount of swap. >>=20 >> I thought the same as phk. And I always thought those messages were >> just informational warnings on what to do to stop that excess swap >> space being unused and effectively wasted (i.e. suggestions to change >> settings, or reduce the swap size!), but you say this isn't correct: >>=20 >>> As I understand, the 2097152 pages vs. 916632 pages example means >>> that it was operating with the referenced fragmentation problems >>> being more likely. That would not be true if it was just using >>> more like the 916632 pages and ignoring the rest. >>=20 >> Are you, phk, or anyone else, able to provide further pointers or >> clarification on this? >=20 > In: >=20 > = https://lists.freebsd.org/archives/freebsd-current/2023-January/003086.htm= l >=20 > I wrote text between the places the places that you quote: >=20 > "warning: increase kern.maxswzone or reduce amount of swap." >=20 > and: >=20 > "As I understand, the 2097152 pages vs. 916632 pages example means" >=20 > that included quotes from man 8 loader, specifically its > kern.maxswzone material, that indicated there are resource > tradeoffs in adjusting kern.maxswzone and also indicated that > "care should be taken to not configure more swap than approximately > half of the theoretical maximum". It also says that kern.maxswzone > "directly governs the maximum amount of swap the system can support". >=20 > I'll also note that adjusting kern.maxswzone does not, of itself, > notably change the amount of swap that would be put to use for the > same workload. >=20 > So a message reporting to either adjust kern.maxswzone or > reduce the amount of swap is not documented to just be about > avoiding unused swap space, so long as the system does not > reach the "unrecoverable state" that was referenced in the > same quoted material. >=20 > If what I quoted is insufficient evidence for you, I'm not > likely to find other evidence that would be sufficient > for you. (Not that I've ever found other material about > the issue.) One adjustment: I forgot that these days the material that I originally quoted has moved around and where to find it depends on the vintage of FreeBSD in question. For 13.1-RELEASE: = https://man.freebsd.org/cgi/man.cgi?query=3Dloader&apropos=3D0&sektion=3D8= &manpath=3DFreeBSD+13.1-RELEASE&arch=3Ddefault&format=3Dhtml shows it in man 8 loader . (Similarly for older.) But for 13.2-STABLE: = https://man.freebsd.org/cgi/man.cgi?query=3Dloader_simp&apropos=3D0&sektio= n=3D8&manpath=3DFreeBSD+13.2-STABLE&arch=3Ddefault&format=3Dhtml shows it in man 8 loader_simp . (Similarly for 14.0-CURRENT.) =3D=3D=3D Mark Millard marklmi at yahoo.com