Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Jan 2019 16:03:02 +0000
From:      RW <rwmaillists@googlemail.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: The mysterious kern.maxswzone
Message-ID:  <20190121160302.0a5e2805@gumby.homeunix.com>
In-Reply-To: <50f1f8d5-7db6-4abb-6beb-c82f17396304@netfence.it>
References:  <20190116022046.GA45024@admin.sibptus.ru> <50f1f8d5-7db6-4abb-6beb-c82f17396304@netfence.it>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 21 Jan 2019 08:56:05 +0100
Andrea Venturoli wrote:

> On 1/16/19 3:20 AM, Victor Sudakov wrote:

>
> > 
> > warning: total configured swap (131072 pages) exceeds maximum
> > recommended amount (113792 pages). warning: increase kern.maxswzone
> > or reduce amount of swap.  
> 
> Many of my systems show this warning: in general it's harmless and
> you can ignore it.

Do you know, for sure, that there isn't a risk of a panic if you run out
of zone space before you run out of swap.

> > # sysctl kern.maxswzone
> > kern.maxswzone: 36175872  
> 
> This is strange: on all my boxes (all 11.2/amd64) kern.maxswzone=0.
> If you did not set this manually (where, I don't know), perhaps this
> is an i386 vs amd64 thing.

That rings a bell. In i386 kern.maxswzone defaults to that fixed
value of 36175872. In other architectures it defaults to zero, which
means use a computed amount based on RAM size. In amd64 you can't
increase the zone size because that computed default is also the limit.
In this case, with i386, 36175872 is below the limit, so you can
increase it. 

The value is in bytes, so it isn't huge. Try setting it to a few percent
above 

  36175872 * 131072 / 113792

something like 42500000

It should be set in loader.conf, not via sysctl.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190121160302.0a5e2805>