adjust kmem_size for large vm_kmem_size
Andriy Gapon
avg at freebsd.org
Thu Oct 7 17:30:36 UTC 2010
on 29/09/2010 12:56 Andriy Gapon said the following:
>
> We use kmem_size() function in ZFS ARC sizing code to determine values like
> arc_c_min and arc_c_mac. kmem_size() currently returns vm_kmem_size.
> OpenSolaris uses 'physmem' value for the same purpose.
>
> I guess that we use vm_kmem_size because typically it is (much) smaller than
> amount of physical memory.
> On the other hand, it is possible to set vm_kmem_size to value larger than
> physical memory (up to 2x is allowed). Sometimes it is even advisable to do so
> to work around kernel KVA space fragmentation.
>
> I think that we should use smaller of the two parameters when deciding ARC size.
> The patch below tries to implement that logic.
[snip]
> Perhaps, this should be split into two functions: one that sets kmem_size at
> appropriate moment and one that simply returns its value.
Updated patch:
http://people.freebsd.org/~avg/osol-kmem_size.diff
I am going to commit it if no one objects.
--
Andriy Gapon
More information about the zfs-devel
mailing list