From owner-freebsd-hackers@freebsd.org Sun May 19 15:53:24 2019 Return-Path: Delivered-To: freebsd-hackers@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 9ECE515B1350 for ; Sun, 19 May 2019 15:53:24 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic312-23.consmr.mail.ne1.yahoo.com (sonic312-23.consmr.mail.ne1.yahoo.com [66.163.191.204]) (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 2AAAA6A1C1 for ; Sun, 19 May 2019 15:53:22 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: 4avksnMVM1lOnJw95Y4nxh7FdqZLPruLXg_RU8KvVnLHrHbmX8GwMtkfk55TQLw jezBQru4OIVxpvJvCflk60OyMl8ep9UAlTbQGHl1jFjDZVnCL_NbIbrUH4rYq7l5pbUwprpzK2ku dUqF6Kj1bcauk18Bzw6.kE3nSU.pioRqASi7kyWG0.HfKDkDHHiS8YpXEQJBoDeK1Jr4ErCHkJ0f XaMdbTsTI4FCWSTarDEfzuEQcXrTU4Z4WqK.27IjP9trvJ0j38QfuQEV2mvfA1iXd_L0BBaANl7T eq2KeE7XrY37e9bXMWZJeE2HX5QuxCdpEOvYC1ucrWOsP21WaKGcGDgYbt2ohWvOMn0mcB_N5xvm .KTGrMwa68OCiCrICgb19u3AtQscTfWpDs_RHPV8kVBekD3nmuaswPuawAR1DKTzl_NhCmyNNTOT CI2om7vpiugKR6DRz5mrT_HQy0oEIU49NTqzXkLzyiq64NN9lI4C3574eCwnegIoJ5v.ilsjdT4B xH2tjNkNKkA2hfM3uMT6I90OXapIv8gc8ZWfEfi9u8sB2kZ7mgA6NDBvFUIjkKturM2r.FeP3TkQ rCB2VLDu1wiuHyHY2MI_UNBAfEMRVJZ5M.E968VvIxoohYni92.1dCHZ9BKzlI_XIP3RfE7MVuOy PgJUh5dQEKFObY5wDhoYOOte5tYmRkVhMXf58seAXyuL0obDqZB6n40IUbzXObZSX7RZ4Ykj72Hz aeLwCrjbBoNfd_j.j6c_gEy77LIdSns.M4_.mb0qlTl5SmWCYaLQrt9YPZJWLVFfa4NnqW_cB4Qd 5sQHhr9j2BWIHnVKHKryVmrPAJY0rfNS4nrkqjNCUzfImFsn6cyHDR8f1jd0mK0Fw8.ficmBnP5. PIy1TcWjF1_9oxwdkxB0YrLC_gWMTywGRivustijaVT5F0Zr92ZXqYzCt7Oy3TnohwbqF.BD.eBo KBTgplPUDrTVcZvcmXL5cPo76D4TmxJu_V1YhnPFDvbrRcRwnAzuM3ehR5DczhN.aU41gNaiKDgY nj476_08Q6PPFs08zQHi8DO9_mjU5eClsJBNSremIabzjblnuTu2tV04LlCxDJS3GPQ_h0tQg9xd euuiAmLcbXGPP357lOdBccq6qf5HOpNgAKkkYQ7aaEgD_rZKWizhzYwZWiqb6XumjTumFd243blW pms8VfxCf2J3PhtVvvmQYX9OxLNKvt78SE.Xo0zy9E8E9DpGFMRvIJsRzNQ2fvyfLssRp9JI- Received: from sonic.gate.mail.ne1.yahoo.com by sonic312.consmr.mail.ne1.yahoo.com with HTTP; Sun, 19 May 2019 15:53:21 +0000 Received: from c-76-115-7-162.hsd1.or.comcast.net (EHLO [192.168.1.103]) ([76.115.7.162]) by smtp427.mail.ne1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 2f26cc64315f70001cffdb4cf9a774b4; Sun, 19 May 2019 15:53:17 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: total configured swap exceeds maximum From: Mark Millard In-Reply-To: Date: Sun, 19 May 2019 08:53:15 -0700 Cc: RW , freebsd-hackers@freebsd.org Content-Transfer-Encoding: 7bit Message-Id: <18598E43-CFB1-4C3C-BC46-A4F0DEB569CF@yahoo.com> References: <20190519160033.0b0e47fa@gumby.homeunix.com> To: Wojciech Puchar X-Mailer: Apple Mail (2.3445.104.11) X-Rspamd-Queue-Id: 2AAAA6A1C1 X-Spamd-Bar: + X-Spamd-Result: default: False [1.71 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; MV_CASE(0.50)[]; FREEMAIL_FROM(0.00)[yahoo.com]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[yahoo.com:+]; MX_GOOD(-0.01)[cached: mta6.am0.yahoodns.net]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; 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:36646, ipnet:66.163.184.0/21, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; SUBJECT_ENDS_SPACES(0.50)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; NEURAL_HAM_MEDIUM(-0.28)[-0.282,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_SPAM_SHORT(0.81)[0.813,0]; NEURAL_HAM_LONG(-0.37)[-0.375,0]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(1.56)[ip: (5.33), ipnet: 66.163.184.0/21(1.42), asn: 36646(1.13), country: US(-0.06)]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[204.191.163.66.list.dnswl.org : 127.0.5.0]; FREEMAIL_CC(0.00)[googlemail.com] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 May 2019 15:53:24 -0000 On 2019-May-19, at 08:33, Wojciech Puchar wrote: >>> what should i set kern.maxswzone to ? it is 0 >>> >>> # sysctl kern.maxswzone >>> kern.maxswzone: 0 >> >> IIRC for amd64 kern.maxswzone=0 represents the maximum allowed. > so i cannot have more VM than 5*RAM? There is is a kernel memory tradeoff structure to increase in kern.maxswzone being larger as I understand. Quoting "man 8 loader" (but the "eight times" is system/architecture specific and will likely be different): 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, at the rate of approximately 200 MB of swap space per 1 MB of metadata. This value is specified in bytes of KVA space. If no value is provided, the system allocates enough memory to handle an amount of swap that corresponds to eight times the amount of physical memory present in the system. 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. 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. === Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)