From owner-freebsd-current@FreeBSD.ORG Sun Jan 6 22:33:20 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 541FA16A41B; Sun, 6 Jan 2008 22:33:20 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id 363FE13C4D3; Sun, 6 Jan 2008 22:33:20 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id CA4C548436; Sun, 6 Jan 2008 17:33:19 -0500 (EST) Date: Sun, 6 Jan 2008 22:33:19 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Kris Kennaway In-Reply-To: <47814B53.50405@FreeBSD.org> Message-ID: <20080106223153.V72782@fledge.watson.org> References: <20080104163352.GA42835@lor.one-eyed-alien.net> <9bbcef730801040958t36e48c9fjd0fbfabd49b08b97@mail.gmail.com> <200801061051.26817.peter.schuller@infidyne.com> <9bbcef730801060458k4bc9f2d6uc3f097d70e087b68@mail.gmail.com> <4780D289.7020509@FreeBSD.org> <4780E546.9050303@FreeBSD.org> <9bbcef730801060651y489f1f9bw269d0968407dd8fb@mail.gmail.com> <4780EF09.4090908@FreeBSD.org> <47810BE3.4080601@FreeBSD.org> <4781113C.3090904@FreeBSD.org> <47814B53.50405@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-current@freebsd.org, Vadim Goncharov Subject: Re: When will ZFS become stable? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Jan 2008 22:33:20 -0000 On Sun, 6 Jan 2008, Kris Kennaway wrote: > Vadim Goncharov wrote: >> 06.01.08 @ 23:34 Kris Kennaway wrote: >> >>>> What is the other 512 MB of the 1 GB used for? >>> >>> Everything else that the kernel needs address space for. Buffer cache, >>> mbuf allocation, etc. >> >> Aren't they allocated from the same memory zones? I have a router with 256 >> Mb RAM, it had a panic with ng_nat once due to exhausted kmem. So, what >> these number from it's sysctl do really mean? >> >> vm.kmem_size: 83415040 >> vm.kmem_size_max: 335544320 >> vm.kmem_size_scale: 3 >> vm.kvm_size: 1073737728 >> vm.kvm_free: 704638976 > > I believe that mbufs are allocated from a separate map. In your case you > only have ~80MB available in your kmem_map, which is used for malloc() in > the kernel. It is possible that ng_nat in combination with the other kernel > malloc usage exhausted this relatively small amount of space without mbuf > use being a factor. Actually, with mbuma, this has changed -- mbufs are now allocated from the general kernel map. Pipe buffer memory and a few other things are still allocated from separate maps, however. In fact, this was one of the known issues with the introduction of large cluster sizes without resource limits: address space and memory use were potentially unbounded, so Randall recently properly implemented the resource limits on mbuf clusters of large sizes. Robert N M Watson Computer Laboratory University of Cambridge