Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Oct 2011 00:31:27 +0000
From:      Artem Belevich <art@freebsd.org>
To:        Aristedes Maniatis <ari@ish.com.au>
Cc:        freebsd-fs@freebsd.org
Subject:   Re: vm.kmem_size_scale recommendation for ZFS
Message-ID:  <CAFqOu6j66dnBL-Xiwhp=3GfzyYyZki_v_8zox7N0i=gnnTbFNQ@mail.gmail.com>
In-Reply-To: <4E8ACE1E.4060608@ish.com.au>
References:  <4E8A8740.100@ish.com.au> <4E8ACE1E.4060608@ish.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Oct 4, 2011 at 2:13 AM, Aristedes Maniatis <ari@ish.com.au> wrote:
> But back to the original question. Pawel recommends in his 1 year old blog
> entry that kmem should be 150% of actual RAM (I don't really understand why,
> but he is the expert). Andriy committed scale=1 earlier this year which is
> more like 97% of actual RAM. Which is correct?
>
> I understand how ARC works, but I don't understand why kmem is tunable in
> ordinary operation or why one value should be preferred.

Think of packing randomly sized round pebbles (randomly sized ARC data
chunks in this case) into square boxes (power-of-2 allocator bins or
perhaps multiples of 4K pages for larger allocations). It's obvious
that you will not be able to reach 100% utilization. kmem_size
provides address space for the allocator which will then map physical
memory there. Hence if you want to use certain amount of physical
memory in kernel, you should make sure that kmem_map is large enough
to accommodate it including the overhead.

--Artem



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFqOu6j66dnBL-Xiwhp=3GfzyYyZki_v_8zox7N0i=gnnTbFNQ>