Date: Sun, 19 May 2019 08:53:15 -0700 From: Mark Millard <marklmi@yahoo.com> To: Wojciech Puchar <wojtek@puchar.net> Cc: RW <rwmaillists@googlemail.com>, freebsd-hackers@freebsd.org Subject: Re: total configured swap exceeds maximum Message-ID: <18598E43-CFB1-4C3C-BC46-A4F0DEB569CF@yahoo.com> In-Reply-To: <alpine.BSF.2.20.1905191733230.61441@puchar.net> References: <alpine.BSF.2.20.1905191204540.4805@puchar.net> <20190519160033.0b0e47fa@gumby.homeunix.com> <alpine.BSF.2.20.1905191733230.61441@puchar.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2019-May-19, at 08:33, Wojciech Puchar <wojtek@puchar.net> 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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?18598E43-CFB1-4C3C-BC46-A4F0DEB569CF>