Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 May 2010 04:01:00 -0700
From:      Jeremy Chadwick <freebsd@jdc.parodius.com>
To:        Giulio Ferro <auryn@zirakzigil.org>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: Freebsd 8.0 kmem map too small
Message-ID:  <20100503110100.GA93137@icarus.home.lan>
In-Reply-To: <4BDEA86E.3050109@zirakzigil.org>
References:  <4BDEA86E.3050109@zirakzigil.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, May 03, 2010 at 12:41:50PM +0200, Giulio Ferro wrote:
> NFS server amd64 Freebsd 8.0 recent (2 days ago)
> 
> This server has been running for several months without problems.
> Beginning last week, however, I'm experiencing panics (about 1 per day)
> with the error in the subject
> 
> Current settings:
> 
> 
> vm.kmem_size_scale: 3
> vm.kmem_size_max: 329853485875
> vm.kmem_size_min: 0
> vm.kmem_size: 2764046336
> ...
> hw.physmem: 8568225792
> hw.usermem: 6117404672
> hw.realmem: 9395240960
> ...
> vfs.zfs.l2arc_noprefetch: 0
> vfs.zfs.l2arc_feed_secs_shift: 1
> vfs.zfs.l2arc_feed_secs: 1
> vfs.zfs.l2arc_headroom: 128
> vfs.zfs.l2arc_write_boost: 67108864
> vfs.zfs.l2arc_write_max: 67108864
> vfs.zfs.arc_meta_limit: 431882240
> vfs.zfs.arc_meta_used: 431874720
> vfs.zfs.arc_min: 215941120
> vfs.zfs.arc_max: 1727528960
> 
> 
> I've set nothing in either /boot/loader.conf or sysctl.conf
> 
> 
> What should I do?

You need to adjust vm.kmem_size to provide more space for the ARC.

Below are ZFS-relevant entries in our /boot/loader.conf on production
RELENG_8 systems with 8GB of RAM.  The reason we set kmem_size to half
our physical system memory is because I didn't want to risk other
processes which use a larger maxdsiz/dfldsiz/maxssiz to potentially
exhaust all memory.


# Increase vm.kmem_size to allow for ZFS ARC to utilise more memory.
vm.kmem_size="4096M"
vfs.zfs.arc_max="3584M"

# Disable ZFS prefetching
# http://southbrain.com/south/2008/04/the-nightmare-comes-slowly-zfs.html
# Increases overall speed of ZFS, but when disk flushing/writes occur,
# system is less responsive (due to extreme disk I/O).
# NOTE: 8.0-RC1 disables this by default on systems <= 4GB RAM anyway
# NOTE: System has 8GB of RAM, so prefetch would be enabled by default.
vfs.zfs.prefetch_disable="1"

# Decrease ZFS txg timeout value from 30 (default) to 5 seconds.  This
# should increase throughput and decrease the "bursty" stalls that
# happen during immense I/O with ZFS.
# http://lists.freebsd.org/pipermail/freebsd-fs/2009-December/007343.html
# http://lists.freebsd.org/pipermail/freebsd-fs/2009-December/007355.html
vfs.zfs.txg.timeout="5"


-- 
| Jeremy Chadwick                                   jdc@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?20100503110100.GA93137>