From owner-freebsd-hackers@freebsd.org Wed Feb 24 19:59:42 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 AD1F9567B63 for ; Wed, 24 Feb 2021 19:59:42 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic305-20.consmr.mail.gq1.yahoo.com (sonic305-20.consmr.mail.gq1.yahoo.com [98.137.64.83]) (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 4Dm6Fp306tz4ZJX for ; Wed, 24 Feb 2021 19:59:42 +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=1614196780; bh=ikOyfTTcOHd4QfvtGJFoPnvAmZ2mIuxqFdVtZF69GER=; h=X-Sonic-MF:Subject:From:Date:To:From:Subject; b=kK/HN+C/6FzDI1ikI1ZIi22eGiTqmA97z/iRqoiXrjdSyapVU9TJXjIM5/st+0XSMZGyTBDmrrFJd/WrXVwXeeYA0JhVaRjtVlP2zE7DJAY/EraxC5ryGVVeR5z1XY+cIlzz+TOzbzW6WZkWXJQLC6o4vr5Q8iDDMJb6sReHaVlRoSQHkZq6jy3st/jhc0ojRIe5P85a5dbEjXk7nv3S9Mui7y1C6/6pv5XxsEkUop4QkZzgGexwMc2J5bfpxQfD87CRIL2o1wHI0nby8mco1CcyGAPx3nGi0lzTOgJlPBzG6Hzs8xUVOlq51CJYwNPSTo9Ivocq85sQy+ZD3k7vlA== X-YMail-OSG: IUA1kmAVM1lFnIjbojkxC0xUJAWtfmAORyvSE8rn4ko8STQGRFguQag2jJfOwpi xVgXN0ZwC8qC82A2WZ2U7tI22fuGAnL9ciGfPRZCGr4hx48d2f0lV5PXLXDkX85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ZfOhFiP6JZ8K .AFJK8OWGBzSvLXFMunZ72y3pawTFF7F_oykJPCl0QEUS5Rn.Vbv8XvUn4BdPMk_rQI0S8LTRI9c S26VX.BzcL9xLuc2olZFGRRnTL5Aef55bip0DyaQgugCxtMvP3pwFeu.fEHZMxHtebnhIj10dj6y Q0vbBqpMjkFd7tbRyHyaeY5pebpgcwYwNgJkTQ3QHgpXP9S8E10aLcGOyWTAc2B40bm25222F7of 57Qlx6yv328AJI52h2DDto9zvJXxin1DuPJ2GFyF1s_ZMFymmypo5PcHNo.czxZeea2RzQEgieH. 7RrRWE2boT1jXRL_z7vLJQr9gD7.Al172xOlIjpPJ5DaefphqcVPMxhL4RLY- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic305.consmr.mail.gq1.yahoo.com with HTTP; Wed, 24 Feb 2021 19:59:40 +0000 Received: by smtp410.mail.bf1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 695e29416172c46981f0cbdd9102670b; Wed, 24 Feb 2021 19:59:36 +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: Wed, 24 Feb 2021 11:59:33 -0800 Cc: Alan Somers , FreeBSD Hackers Content-Transfer-Encoding: quoted-printable Message-Id: References: <1984125.0OzZcVfBr4@ravel> To: Konstantin Belousov X-Mailer: Apple Mail (2.3654.60.0.2.21) X-Rspamd-Queue-Id: 4Dm6Fp306tz4ZJX X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] 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: Wed, 24 Feb 2021 19:59:42 -0000 On 2021-Feb-24, at 10:36, Konstantin Belousov = wrote: > On Wed, Feb 24, 2021 at 10:34:23AM -0700, Alan Somers wrote: >> There's another silly problem that I didn't mention in my original = post. >> The old rule of thumb is that the swap partition's size should be = twice as >> large as the amount of RAM. However, that's no longer possible in = many >> cases. The kernel imposes a hard limit of 64 GiB (on amd64 at least) = on >> the usable size of any swap partition, and many servers now have far = more >> than 64 GiB of RAM. So the advice needs to change with the times. I = don't > I do not think so. The usable size of the swap is determined by the > amount of swap metadata we pre-configure at boot time. Usually it is > sized proportionally to the available physical memory, but you can > override swap zones size manually with the knob. There was a period of time when the 128 GiByte RAM ThreadRipper had its previous 192 GiByte swap partition use rejected and I had to split it into 3 64 GiByte ones. Later I saw a checkin that was a correction to some calculation (vague memory) and I retried having one 192 GiByte swap partition and it was again allowed. The ability to dump to a swap partition when there was a 64 GiByte limitation with 128 GiByte of RAM had implications for the configuration. I actually arranged having a partition that was only used for dump's potential use. That took some rearrangement to form a large enough space, making other tradeoffs to do so. (I'm not sure if I can find the commit that lead to me switching back to more than 64 GiByte for a swap file on the large memory machine. I do not remember details any more.) >> know what the best size would be for a modern server, but I would = guess >> that it must be at least several times the RSS of your largest = process, and >> also at least one tenth of RAM (for use as a dump device with = compressed >> core dumps). =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)