Repeatable ZFS "kmem map too small" panic on 8.0-STABLE
Adam McDougall
mcdouga9 at egr.msu.edu
Sat Jan 23 16:54:10 UTC 2010
On Fri, Jan 22, 2010 at 06:24:36PM -0800, Artem Belevich wrote:
> % sysctl hw.physmem vm.kmem_size vm.kmem_size_max vfs.zfs.arc_max
>
> hw.physmem:4102688768
> vm.kmem_size: 2147483648
Here's your problem -- kmem_size is for some reason only 2G.
Argh! I ran into that before. The code in sys/kern/kern_malloc.c
intentionally limits kmem_size to twice the physical memory size:
/*
* Limit kmem virtual size to twice the physical memory.
* This allows for kmem map sparseness, but limits the size
* to something sane. Be careful to not overflow the 32bit
* ints while doing the check.
*/
if (((vm_kmem_size / 2) / PAGE_SIZE) > cnt.v_page_count)
vm_kmem_size = 2 * cnt.v_page_count * PAGE_SIZE;
So, either comment out these lines or just set vm.kmem_size to
slightly below 8G.
--Artem
That works for me and a friend of mine, I didn't realize that my kmem_size
was being capped. I tested it on a 8.0-prerel server with 8G of ram,
kmem_size set to 20G in the loader but the resulting kmem_size was less than
4G before the patch. Now it is 20G. So, I'm not sure it calculates it properly?
More information about the freebsd-fs
mailing list