From owner-freebsd-questions@FreeBSD.ORG Wed Jan 13 19:21:59 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D03C106568B; Wed, 13 Jan 2010 19:21:59 +0000 (UTC) (envelope-from doug@polands.org) Received: from hrndva-omtalb.mail.rr.com (hrndva-omtalb.mail.rr.com [71.74.56.125]) by mx1.freebsd.org (Postfix) with ESMTP id 0DA578FC1F; Wed, 13 Jan 2010 19:21:58 +0000 (UTC) X-Authority-Analysis: v=1.0 c=1 a=sVhNVL3m-NYA:10 a=tH3TCQxNhl/vWwTfLVWeHw==:17 a=aFl7iEqPPjubU7q8rekA:9 a=2aYGC8fBjnS7EApR6NlDFkKi-HgA:4 a=cnpg3XxhHd7fwahd:21 a=DpkB9jtZByFGn99T:21 X-Cloudmark-Score: 0 X-Originating-IP: 75.87.219.217 Received: from [75.87.219.217] ([75.87.219.217:57005] helo=haran.polands.org) by hrndva-oedge04.mail.rr.com (envelope-from ) (ecelerity 2.2.2.39 r()) with ESMTP id D5/16-18377-55D1E4B4; Wed, 13 Jan 2010 19:21:58 +0000 Received: from email.polands.org (ammon.polands.org [172.16.1.7]) by haran.polands.org (8.14.3/8.14.3) with ESMTP id o0DJLqDp087952; Wed, 13 Jan 2010 13:21:52 -0600 (CST) (envelope-from doug@polands.org) Received: from 209.103.214.35 (SquirrelMail authenticated user djp) by email.polands.org with HTTP; Wed, 13 Jan 2010 13:21:52 -0600 Message-ID: In-Reply-To: <9bbcef731001131035x604cdea1t81b14589cb10ad25@mail.gmail.com> References: <8418112cdfada93d83ca0cb5307c1d21.squirrel@email.polands.org> <9bbcef731001131035x604cdea1t81b14589cb10ad25@mail.gmail.com> Date: Wed, 13 Jan 2010 13:21:52 -0600 From: "Doug Poland" To: "Ivan Voras" User-Agent: SquirrelMail/1.4.20-RC2 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Cc: Doug Poland , freebsd-questions@freebsd.org Subject: Re: 8.0-R-p2 ZFS: unixbench causing kmem exhaustion panic X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2010 19:21:59 -0000 On Wed, January 13, 2010 12:35, Ivan Voras wrote: >>> >>> Try adding vfs.zfs.arc_max=512M to /boot/loader.conf. >>> >> Would you suggest tweaking the vm.kmem_size tunables in addition to >> arc_max? > > No, unless they auto-tune to something lesser than approximately > arc_max*3. > > I try to set arc_max to be a third (or a quarter) the kmem_size, and > tune kmem_size ad_hoc to suit the machine and its purpose. > > The reason for this is that "arc_max" is just a guideline, not a hard > limit... the ZFS ARC usage can and will spike to much larger values, > usually in the most inopportune moment. > This is the state of the machine when it panicked this time: panic: kmem_malloc(131072): kmem_map too small: 1296957440 total allocated cpuid = 1 /boot/loader.conf: vfs.zfs.arc_max=512M vfs.numvnodes: 660 vfs.zfs.arc_max: 536870912 vfs.zfs.arc_meta_limit: 134217728 vfs.zfs.arc_meta_used: 7006136 vfs.zfs.arc_min: 67108864 vfs.zfs.zil_disable: 0 vm.kmem_size: 1327202304 vm.kmem_size_max: 329853485875 Using a handy little script I found posted in several places, I was monitoring memory: TEXT 15373968 14.66 MiB DATA 1536957440 1465.76 MiB TOTAL 1552331408 1480.42 MiB Where TEXT = a sum of kldstat memory values and DATA = a sum of vmstat -m values Is there a next step to try, or is this chasing a wild goose? -- Regards, Doug