From owner-freebsd-stable Sat Aug 31 17: 4: 9 2002 Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1384A37B400; Sat, 31 Aug 2002 17:04:07 -0700 (PDT) Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7D60B43E65; Sat, 31 Aug 2002 17:04:06 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (localhost [127.0.0.1]) by apollo.backplane.com (8.12.5/8.12.4) with ESMTP id g81046PQ010757; Sat, 31 Aug 2002 17:04:06 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.12.5/8.12.4/Submit) id g81045O1010756; Sat, 31 Aug 2002 17:04:05 -0700 (PDT) (envelope-from dillon) Date: Sat, 31 Aug 2002 17:04:05 -0700 (PDT) From: Matthew Dillon Message-Id: <200209010004.g81045O1010756@apollo.backplane.com> To: "Marc G. Fournier" Cc: Arnvid Karstad , , Subject: Re: Problems with FreeBSD - causing zalloc to return 0 ?! References: <20020831200929.C14642-100000@mail1.hub.org> Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG :> 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 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message