kmem_map too small under ZFS

Scot Hetzel swhetzel at gmail.com
Mon Jan 7 08:02:38 PST 2008


On 1/7/08, Pete French <petefrench at ticketswitch.com> wrote:
> > vm.kmem_size="512M"
> > vm.kmem_size_max="512M"
>
> I have similar to this in mine...
>
> vm.kmem_size=629145600
> vm.kmem_size_max=629145600
>
> which is about 600 meg - the machine has 2 gig of RAM.
>
> > vfs.zfs.prefetch_disable="1"
> > vfs.zfs.arc_max="150M"
> > kern.maxvnodes="400000"
>
> now these I havent got - I did see a reference to disabling the intent log,
> which is what I was about to try. I will give your settings a shot too.
>
> > Most of these settings came from various mailing list postings.  It's
> > possible that some don't do anything useful, but I haven't had a zfs
> > related panic since.
>
> Worth a try - might see if I can find a way tro reliably trigger the
> opanic and then tyrn these bits back on one at a time too.
>

I use the following settings that were obtained from the
ZFSTuningGuide a while back.

#
# ZFS Tunning (amd64) - http://wiki.freebsd.org/ZFSTuningGuide
#
# kern.maxvnodes="400000" - sysctl.conf
# 1073741824 = 1G
vm.kmem_size="1073741824"
vm.kmem_size_max="1073741824"
#vfs.zfs.zil_disable=1
#vfs.zfs.prefetch_disable=1
# arc_max = 2 * kmem_size / 3
#vfs.zfs.arc_max="683M"

The commented out settings are no longer in the guide, and I haven't
had any problems with just setting vm.kmem_size* on FreeBSD/amd64.

Is your system FreeBSD/amd64 or FreeBSD/i386?  If it is FreeBSD/i386
you will need to increase KVA_PAGES as suggested in the guide.

Scot


More information about the freebsd-stable mailing list