Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 5 May 2007 10:18:06 -0700
From:      John-Mark Gurney <gurney_j@resnet.uoregon.edu>
To:        "Marc G. Fournier" <freebsd@hub.org>
Cc:        pluknet <pluknet@gmail.com>, freebsd-stable@freebsd.org
Subject:   Re: swap zone exhausted, increase kern.maxswzone
Message-ID:  <20070505171806.GK17958@funkthat.com>
In-Reply-To: <576837AA4FFCB91BF5B92A61@ganymede.hub.org>
References:  <5580F93A753EBAEF71B41EE7@ganymede.hub.org> <20070505160655.GA847@xor.obsecurity.org> <F7A69B1C2C53E12D2A2DCB1A@ganymede.hub.org> <a31046fc0705050935t631d034bm152fdd949565f3c2@mail.gmail.com> <576837AA4FFCB91BF5B92A61@ganymede.hub.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Marc G. Fournier wrote this message on Sat, May 05, 2007 at 13:42 -0300:
> > On 05/05/07, Marc G. Fournier <freebsd@hub.org> wrote:
> >> # sysctl kern.maxswzone
> >> sysctl: unknown oid 'kern.maxswzone'
> >
> > It is a /boot/loader.conf variable, not in sysctl MIB.
> 
> Hrmmm ... then how do I know what to increase it to, if I don't know what it 
> currently set to? :(  I thought all the /boot/loader.conf variables were 
> viewable read only via sysctl ... ?  kinda like nmbclusters:
> 
> # sysctl -a | grep nmbcl
> kern.ipc.nmbclusters: 25600
> 
> I can't set it via sysctl, it has to be in /boot/loader.conf ... but I can at 
> least view its value ...

Take a peek at sys/kern/subr_param.c:
#ifdef VM_SWZONE_SIZE_MAX
        maxswzone = VM_SWZONE_SIZE_MAX;
#endif
        TUNABLE_INT_FETCH("kern.maxswzone", &maxswzone);

and then:
crijmgmac,ttyp8,~/FreeBSD/HEAD/src/sys,507$find . -type f | xargs grep VM_SWZONE_SIZE_MAX
./amd64/include/param.h:#ifndef VM_SWZONE_SIZE_MAX
./amd64/include/param.h:#define VM_SWZONE_SIZE_MAX      (32 * 1024 * 1024)
./boot/common/loader.8:.Dv VM_SWZONE_SIZE_MAX .
./conf/options:VM_SWZONE_SIZE_MAX       opt_param.h
./i386/include/param.h:#ifndef VM_SWZONE_SIZE_MAX
./i386/include/param.h:#define VM_SWZONE_SIZE_MAX       (32 * 1024 * 1024)
./kern/subr_param.c:#ifdef VM_SWZONE_SIZE_MAX
./kern/subr_param.c:    maxswzone = VM_SWZONE_SIZE_MAX;

So, it appears that loader(8) isn't correct:
                   swap the system can support.  This value is specified in
                   bytes of KVA space and defaults to around 70MBytes.  Care

It appears that when dillion made the change almost 5 years ago, he
didn't update loader(8)...  I'll fix that...

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."



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