From owner-freebsd-stable@FreeBSD.ORG Thu Sep 25 13:02:29 2008 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D90091065687 for ; Thu, 25 Sep 2008 13:02:29 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from QMTA08.westchester.pa.mail.comcast.net (qmta08.westchester.pa.mail.comcast.net [76.96.62.80]) by mx1.freebsd.org (Postfix) with ESMTP id 85D008FC14 for ; Thu, 25 Sep 2008 13:02:29 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from OMTA10.westchester.pa.mail.comcast.net ([76.96.62.28]) by QMTA08.westchester.pa.mail.comcast.net with comcast id JzKN1a0050cZkys5812UKT; Thu, 25 Sep 2008 13:02:28 +0000 Received: from koitsu.dyndns.org ([67.180.253.227]) by OMTA10.westchester.pa.mail.comcast.net with comcast id K12T1a00H4v8bD73W12Uow; Thu, 25 Sep 2008 13:02:28 +0000 X-Authority-Analysis: v=1.0 c=1 a=pl5uMaLHwrUA:10 a=20ZdTaP2r60A:10 a=QycZ5dHgAAAA:8 a=2K62Y4ObiraUMsvz2mgA:9 a=ZNjc19_zAArgglB7i6uqxxf7ajsA:4 a=EoioJ0NPDVgA:10 a=LY0hPdMaydYA:10 Received: by icarus.home.lan (Postfix, from userid 1000) id 3C13DC9419; Thu, 25 Sep 2008 06:02:27 -0700 (PDT) Date: Thu, 25 Sep 2008 06:02:27 -0700 From: Jeremy Chadwick To: Bartosz Stec Message-ID: <20080925130227.GA13497@icarus.home.lan> References: <48DB6772.1060400@kkip.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <48DB6772.1060400@kkip.pl> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: freebsd-stable@freebsd.org Subject: Re: vm.kmem_size settings doesn't affect loader? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Sep 2008 13:02:29 -0000 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 |