Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Sep 2008 06:02:27 -0700
From:      Jeremy Chadwick <koitsu@FreeBSD.org>
To:        Bartosz Stec <admin@kkip.pl>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: vm.kmem_size settings doesn't affect loader?
Message-ID:  <20080925130227.GA13497@icarus.home.lan>
In-Reply-To: <48DB6772.1060400@kkip.pl>
References:  <48DB6772.1060400@kkip.pl>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Sep 25, 2008 at 12:26:58PM +0200, Bartosz Stec wrote:
>
>
> Today I've experienced zfs-related kernel panic. Log says:
>
>    savecore: reboot after panic: kmem_malloc(131072): kmem_map too
>    small: 327684096 total allocated
>
> Reported amount of memory (327684096) is wrong, because i made suggested  
> tuning in my loader.conf:
>
>    vm.kmem_size="512M"
>    vm.kmem_size_max="512M"
>
> Just to be sure:
>
>    # sysctl vm | grep kmem
>    vm.kmem_size: 536870912
>    vm.kmem_size_min: 0
>    vm.kmem_size_max: 536870912
>    vm.kmem_size_scale: 3
>
> Am I missing something?

I believe this is normal.  The amount shown in "total allocated" will
not match what you have vm.kmem_size or vm.kmem_size_max set to.
Someone more familiar with the VM can explain why this is, but as I
understand it, it's 100% normal.

Your options are:

1) Consider increasing it from 512M to something like 1.5GB; do not
increase it past that on RELENG_7, as there isn't support for more than
2GB total.  For example, on a 1GB memory machine, I often recommend
768M.  On 2GB machines, 1536M.  You will need to run -CURRENT if you
want more.

2) Tune ZFS aggressively.  Start by setting vfs.zfs.arc_min="16M"
and vfs.zfs.arc_max="64M".

If your machine has some small amount of memory (768MB, 1GB, etc.),
then you probably shouldn't be using ZFS.

-- 
| Jeremy Chadwick                                jdc at parodius.com |
| Parodius Networking                       http://www.parodius.com/ |
| UNIX Systems Administrator                  Mountain View, CA, USA |
| Making life hard for others since 1977.              PGP: 4BD6C0CB |




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080925130227.GA13497>