panic: kmem_malloc(131072): kmem_map too small (AMD64)

Darren Reed darrenr at freebsd.org
Sun Sep 23 15:34:37 PDT 2007


Larry Rosenman wrote:
> On Sun, 23 Sep 2007, Claus Guttesen wrote:
>
>>> So I just received this courtesy of ZFS:
>>> panic: kmem_malloc(131072): kmem_map too small: 343027712 total 
>>> allocated
>>> cpuid = 0
>>> KDB: enter: panic
>>>
>>> This was with these settings in loader.conf:
>>> vm.kmem_size=419430400
>>> vm.kmem_size_max=419430400
>>> vfs.zfs.arc_max=409715200
>>
>> How much ram do you have? Is this amd64 or i386?
>
> In my case, 4Gig ram, amd64, and I've seen the panic even with
> 750M vm.kmem_size.
>
> Do we have guidelines on what vm.kmem_size(|_max) should be set to?

My advice would be to tune the ZFS ARC to be smaller than kmem_size.
The above represents a mistake in sizing the ARC.
When using ZFS, I'd tune vm.kmem_size to be as much as 80% of RAM,
unless you're running *large* applications in user space.

Darren



More information about the freebsd-current mailing list