Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Jan 2008 22:33:19 +0000 (GMT)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Kris Kennaway <kris@FreeBSD.org>
Cc:        freebsd-current@freebsd.org, Vadim Goncharov <vadimnuclight@tpu.ru>
Subject:   Re: When will ZFS become stable?
Message-ID:  <20080106223153.V72782@fledge.watson.org>
In-Reply-To: <47814B53.50405@FreeBSD.org>
References:  <fll63b$j1c$1@ger.gmane.org> <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> <flqmbo$eac$1@ger.gmane.org>  <4780E546.9050303@FreeBSD.org> <9bbcef730801060651y489f1f9bw269d0968407dd8fb@mail.gmail.com> <4780EF09.4090908@FreeBSD.org> <flr0ie$euj$1@ger.gmane.org> <47810BE3.4080601@FreeBSD.org> <flr2lr$kph$1@ger.gmane.org> <4781113C.3090904@FreeBSD.org> <opt4i0g3k44fjv08@nuclight.avtf.net> <47814B53.50405@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



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