total configured swap exceeds maximum
Mark Millard
marklmi at yahoo.com
Sun May 19 15:53:24 UTC 2019
On 2019-May-19, at 08:33, Wojciech Puchar <wojtek at 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)
More information about the freebsd-hackers
mailing list