vm.kmem_size_scale recommendation for ZFS

Artem Belevich art at freebsd.org
Wed Oct 5 00:31:28 UTC 2011


On Tue, Oct 4, 2011 at 2:13 AM, Aristedes Maniatis <ari at 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


More information about the freebsd-fs mailing list