Repeatable ZFS "kmem map too small" panic on 8.0-STABLE

Artem Belevich fbsdlist at src.cx
Sat Jan 23 02:33:31 UTC 2010


Ignore my previous email. Something else is probably at play here. If
I were right, then you should have ended up with vm.kmem_size=8G.
However, in your case it's 2G. Beats me why.

You may want to get to the console prompt and check whether loader did
set the values correctly before it boots the kernel. If it didn't,
then there may be something wrong with your /boot/loader.conf.
Unfortunately whatever errors loader prints are immediately erased by
the boot menu, so it's hard to see what exactly is the problem.

--Artem



On Fri, Jan 22, 2010 at 6:24 PM, Artem Belevich <fbsdlist at src.cx> 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
>


More information about the freebsd-fs mailing list