From nobody Sun Jan 22 08:42:49 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 4P06FN4FMmz311X8 for ; Sun, 22 Jan 2023 08:43:04 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic303-23.consmr.mail.gq1.yahoo.com (sonic303-23.consmr.mail.gq1.yahoo.com [98.137.64.204]) (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 4P06FM2HnNz3Gb4 for ; Sun, 22 Jan 2023 08:43:03 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=aoYJgK6z; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.64.204 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=1674376981; bh=Iw/J/LOLSbOOOcO0tag/5dguG5H/Y75xmimJ3zgvyt0=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=aoYJgK6zg3p04GHQ7D7RlFExtUZzPwJBI47zxCgSQudrPNcBawKODUkc2RbhNw9okg7vtS2NF+cD3WafYWsTzIfivwF/JCFrFH7VITMFsEwIfSGeCED/cMKXmvRWy53mVOp9kV1iEhJwXkNNXlAe8xz1x5SHf6JN4QxAlc3ByNR24ev7agIM208uSYl5Nr+3tBQi+WgaaA59YyedI4j2Icld+BcTOzs/P8orOqCtibTWFL0IOLkT9wOUnlohK7Wc0L2UEtiv/hWYJbufCv+30XBWDKlHcS19AabRWQYTDw657ZogETw1LTcLqA2SaQu/6qpJKFO6BfHwTyvMqLU3Ag== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1674376981; bh=0exGLGqAcG+7qtBahFj8ljBmlIjCNhE66GKO7CdgKnK=; h=X-Sonic-MF:Subject:From:Date:To:From:Subject; b=kr9xSiNXUznsf5cbv/g4JElnncYG79drrnUV4Dkmypv63iR7wktwnu8P/rfhynpibR9Cj439sHkMdXhO5RxggXZJPrBO7j5InPagjd5PPCIiOukM/zYpblk2w6aIHynAp2zCxlNXLFz3ytOwiqeQMnn21BymgQsJT2GeQ5ggtjbeurMTYossPh3G/t0/fLqMBmR1J/GSqszGCC6Y9N6/4yTwn+TBt57EhqRZ8Yt5+Ibf9ckLmYae1PoFXdJlbjxs8uJHbaXSzxNo5EUNyYZpglQYTen4vwcfMikXZVHoNWoWC/ugwEeGv1ehPwyJ3fxmRpGF9OcJiGBS1K1dvgt22g== X-YMail-OSG: lV6OsCIVM1mtX7t847GExrSnXpMAwnISqA0gz4jGxyCEn7aPbEEq7cRf9qs8tXK gxiCt3alV4MoLNg_FRFrMIj36JuQqgRDoeHwhoD2pN1cDSYsh_JNlAGPCczlObA9ClZUrYC_HZg2 U8yHf79srzhafoXVzbxty.0DjaC2FhMz25Iq4CaGQrtiRKkKLXLJCmFLIQS6fRYMBIxUQVfg2Emw 0uwdlBLXtZ.4VoleGIewfGclDwUn8BWg2h6BSzbMxK0F6cdtXPjei1eHzg.CevajWItZPVwGnh5e xtkuSjFRdiyarcP.Wuc4nEP4GMVmJnzehYOhF4HfrH0dDQSOjptK2IJB7QnOEaySeL8gjGwym6hA 9HwabN_dXnwS8cR.0VdI3DNdW7.DWWufEsyplxAPkZR4dBjalisOon05POesy_r.l2ulOssJwmLg fs41bapqvawN0O7TtqIvU8oBCBuKvFMP2rksg_ZNqyikgP7ghXyf.VU46PfqOQr69a33RQzkz9gk QE2p2ZNmRli.sLOSL4NIZV9BAKQvqUT2Ul8Pm9uim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DDCnviFOBOvqqS2f0Ilnh3OWF4kEfst6 CTZIq8Q9j7DkJYCtut76I5KqM1p21PsJLhTPiRa4BpCRNM8nM1Uqd1XfYDq5QxjZXRuzOwEjV1C6 zyE2vvM.oZGLyBC3HgoTDMoHRalFLbGmEux.nl.Z2ZLoZiwjT6GmTSKWCslYlNINc1gnYciS7FyZ CuONpegylWhG6ku2.0yEIbQr36c9Fl.0f57xIV9xxwjye2_IC8VGLSL_Dr2Zhs1OSQTOcj4j141n iDm9e34xu1P71crBUVIzGXT2bwp70bKu5rVWZdPYYiMnZpwmt8zJVDxWXxnrvTHh3l91Vr6bIbKy tnnUAEFMI6lWtCIYKE4otrvw.IjwkIgwceTpxFWkH5hpij2Dp1R_D4lamkZoX1ZX_0lj0DdI.Y3o K2jCcojA.VdB5Vw08mfxE8a6g5p2L7NTCTKzZ4j8Ox1AcUadVbY75DaOMFpXtUEPHvMzDfABj0Gg YC8ACTXHLbMy7.A91A2JdJu59brEbZPfYoXdi4QNHTt8_xE2yC.Km7xGBgphS6O0HT2DWhTNrhyV K_D0zeMZyUP7TBFNGzgxQLLthNYTQKejrxVIcnIs.TvVXnEvTUcEnMv58_E3SCHaS3EsybAam56M _r30nN_.QygogFcbNjsTnZca26xGR5Wr6XosEB_xguLPXdjSMRil0n3ZUkxjy4F78JWybUnShztF 83Q-- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic303.consmr.mail.gq1.yahoo.com with HTTP; Sun, 22 Jan 2023 08:43:01 +0000 Received: by hermes--production-gq1-6597fd5bbd-ww65t (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 05e5cac3ace28732c52acad9a713c2ed; Sun, 22 Jan 2023 08:43:00 +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.300.101.1.3\)) Subject: Re: An idea for swap partition size vs. swap space size in use handling From: Mark Millard In-Reply-To: <6F24FD22-ED7B-44E2-B6A6-C82F845C3A56@yahoo.com> Date: Sun, 22 Jan 2023 00:42:49 -0800 Cc: freebsd-current Content-Transfer-Encoding: quoted-printable Message-Id: <960C016C-9D43-4F24-8913-363676B5E202@yahoo.com> References: <202301220717.30M7H7wC022099@critter.freebsd.dk> <6F24FD22-ED7B-44E2-B6A6-C82F845C3A56@yahoo.com> To: Poul-Henning Kamp X-Mailer: Apple Mail (2.3731.300.101.1.3) X-Spamd-Result: default: False [-2.84 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; MV_CASE(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; NEURAL_HAM_SHORT(-0.34)[-0.344]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; RCVD_IN_DNSWL_NONE(0.00)[98.137.64.204:from]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; MLMMJ_DEST(0.00)[freebsd-current@freebsd.org]; TO_DN_ALL(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; FREEMAIL_FROM(0.00)[yahoo.com]; RCVD_TLS_LAST(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; MIME_TRACE(0.00)[0:+]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.64.204:from] X-Rspamd-Queue-Id: 4P06FM2HnNz3Gb4 X-Spamd-Bar: -- X-ThisMailContainsUnwantedMimeParts: N On Jan 22, 2023, at 00:21, Mark Millard wrote: > On Jan 21, 2023, at 23:17, Poul-Henning Kamp = wrote: >=20 >> -------- >> Mark Millard writes: >>=20 >>> It would be nice if I could have just one swap partition >>> on a given boot media, one that is more than sufficient >>> in size for all but the biggest RAM system --but to then >>> be able to tell the system to just use up to the >>> recommended swap space size and to ignore any extra swap >>> space in the swap partition. >>=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 > But, as I understand, increasing kern.maxswzone makes > tradoffs with other kernel memory use. man 8 loader > reports: All my references to "man 8 loader" should have been to "man 8 loader_simp" these days. (Old habit, not yet replaced.) > kern.maxswzone > Limits the amount of KVM to be used to hold swap = metadata, > which directly governs the maximum amount of swap = the > system can support . . . > . . . > Note that swap metadata can be fragmented, which = means that > the system can run out of space before it reaches = the > theoretical limit. Therefore, care should be taken = to not > configure more swap than approximately half of the > theoretical maximum. >=20 > (Note: My understanding is that an "approximately half" is the > figure shown as the "recommended amount" in the warnings.) >=20 > Running out of space for swap metadata can leave the = system > in an unrecoverable state. Therefore, you should = only > change this parameter if you need to greatly extend = the KVM > reservation for other resources such as the buffer = cache or > kern.ipc.nmbclusters. Modifies kernel option > VM_SWZONE_SIZE_MAX. >=20 > The wording in man 8 loader is about decreasing kern.maxswzone Again. > in order to make room for other resources. But the implication > is that increases leave less room than normal for other > resources. I try to avoid getting the warnings as I do not have > knowledge/context to make well-guided tradeoffs for the > resources. >=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 > (I was not suggesting changes to default behavior. I was only > suggesting being able to put it in a mode where it would have > used, for example, just around 916632 pages of the swap space.) >=20 >=20 > (Note: Some of the detailed man 8 loader claims that I left out Again. > seem to not be general to all platforms, despite the wording > giving no hint of that issue.) =3D=3D=3D Mark Millard marklmi at yahoo.com