Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 31 Aug 2002 17:04:05 -0700 (PDT)
From:      Matthew Dillon <dillon@apollo.backplane.com>
To:        "Marc G. Fournier" <scrappy@hub.org>
Cc:        Arnvid Karstad <arnvid@karstad.org>, <bmah@FreeBSD.ORG>, <freebsd-stable@FreeBSD.ORG>
Subject:   Re: Problems with FreeBSD - causing zalloc to return 0 ?!
Message-ID:  <200209010004.g81045O1010756@apollo.backplane.com>
References:   <20020831200929.C14642-100000@mail1.hub.org>

next in thread | previous in thread | raw e-mail | index | archive | help
:>     the swap bitmap.  You can also reduce the kernel reservation for
:>     swap block data by setting the kern.maxswzone boot environment
:>     variable.  This is in bytes, e.g. in /boot/loader.conf
:>
:>     kern.maxswzone="32m"
:
:What exactly does this one mean?  Or do?  Will set it, but am curious ...

    When FreeBSD swaps something to swap space it has to record the
    (object,blockno)->swapblockno translation in order to be able to
    figure out how to swap the page back in when a fault is taken.

    This information is recorded in the swap zone.  Approximate memory
    usage, including overhead, is around 6 bytes per page swapped out.
    A 32M KVM reservation (KVM, not physical ram) will thus allow
    around 5 million pages == 22 GB to be swapped out.

    The actual reservation is based on the amount of physical memory on
    the machine but I've been way too generous in the past and I am still
    too generous.  Until the commit I made today the KVM meta storage
    limit for swap information was 70MB of KVM.  In commits I made today I
    reduced the limit to 32MB of KVM and cut the calculation of the actual
    swap zone based on physical memory in half (again).

    This parameter only matters on machines with large amounts of ram
    (> 1GB or so) since machines with less memory will calculate a smaller
    maximum as a matter of course.

    In anycase, we still do not know whether your particular problem is
    related to KVM exhaustion or not.  Your kernel config does not seem
    particularly problemsome.  Those live GDB commands I mentioned
    are the best way to find out (well, a core is the best way to find out
    but the GDB commands will work if no core is available).  Generally
    speaking recent FreeBSD 4.x releases have been chewing up more KVM
    due to new features and a general push to properly balance resources
    to give installations the most bang for the buck.  It works very well
    for nearly all installations but it will still break down if someone
    makes huge changes in certain defaults and does not reduce other areas
    of KVM use to make up the difference.

					-Matt
					Matthew Dillon 
					<dillon@backplane.com>

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




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