From owner-freebsd-stable@FreeBSD.ORG Tue Mar 30 14:30:29 2010 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 5752D1065673 for ; Tue, 30 Mar 2010 14:30:29 +0000 (UTC) (envelope-from jhellenthal@gmail.com) Received: from mail-pz0-f199.google.com (mail-pz0-f199.google.com [209.85.222.199]) by mx1.freebsd.org (Postfix) with ESMTP id 1F9FA8FC08 for ; Tue, 30 Mar 2010 14:30:28 +0000 (UTC) Received: by pzk37 with SMTP id 37so1438512pzk.7 for ; Tue, 30 Mar 2010 07:30:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=GzNXMMPlZOt+Gwrq/HIT3qdiONRiSdoHPqJLNqg4qvQ=; b=Vq4F/6GS52rksbO77OBSYQp1YuoVpUIyxP2HMrn7yt9MZd7uISa6dHt8ofG+p6Cbni nfs8L/0Ud8JRmQBiqtWIBBrUr7JPTXx86nb1i3OcvFld9SQWzWRzJNoOVOholQMPYjD+ MbhgIUZuKVooFhZZjWUeP6gCf9Wp1zDqLDx9A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=eoCDdoLBRk7S0FuHLNgfJX7IsGsiq07KcNSgVyfjdBmFaL3GnR8gYG/j5MWcW6jV// TmmOja/0OSWT8L73XHuxmlIuxzPwQlI6uM6jZttlhR2cP8yW5JYx5N1Vy4LnaX6BjUs/ Dug5zzh3biXHOZrVQX75EyvDj2KmQel5AQAqg= Received: by 10.142.1.2 with SMTP id 2mr474502wfa.73.1269959428447; Tue, 30 Mar 2010 07:30:28 -0700 (PDT) Received: from centel.dataix.local (adsl-99-109-124-168.dsl.klmzmi.sbcglobal.net [99.109.124.168]) by mx.google.com with ESMTPS id 23sm5148662iwn.14.2010.03.30.07.30.26 (version=SSLv3 cipher=RC4-MD5); Tue, 30 Mar 2010 07:30:26 -0700 (PDT) Sender: "J. Hellenthal" Message-ID: <4BB20AED.70802@dataix.net> Date: Tue, 30 Mar 2010 10:30:05 -0400 From: jhell User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.1.8) Gecko/20100329 Thunderbird/3.0.3 MIME-Version: 1.0 To: freebsd-stable@freebsd.org References: <20100215090756.GA54764@icarus.home.lan> <20100215105000.101326yj01j0f64g@webmail.leidinger.net> <20100215122744.GA57382@icarus.home.lan> <20100215161105.14071eiflhc9le68@webmail.leidinger.net> <4B79BA9C.3020402@quip.cz> <4B7AD0A3.9080701@barryp.org> <4BB0BC7C.3000801@barryp.org> In-Reply-To: <4BB0BC7C.3000801@barryp.org> X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: ZFS Tuning - arc_summary.pl 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: Tue, 30 Mar 2010 14:30:29 -0000 On 03/29/2010 10:43, Barry Pederson wrote: > I've been using the arc_summary.pl script from here: > > http://jhell.googlecode.com/svn/base/head/scripts/zfs/arc_summary/arc_summary.pl > > > and noticed some odd numbers, with the ARC Current Size being larger > than the Max Size, and the breakdown adding up to less than the current > size as shown below > > -------- > ARC Size: > Current Size: 992.71M (arcsize) > Target Size: (Adaptive) 512.00M (c) > Min Size (Hard Limit): 81.82M (arc_min) > Max Size (Hard Limit): 512.00M (arc_max) > > ARC Size Breakdown: > Recently Used Cache Size: 99.84% 511.18M (p) > Frequently Used Cache Size: 0.16% 0.82M (c-p) > -------- > > > From another thread I saw, it sounds like arc_max isn't really > a "Hard Limit" but rather some kind of high water mark. If that's > the case then I wonder if this might make more sense.... > > > > --------- > --- arc_summary.pl.original 2010-02-25 19:23:13.000000000 -0600 > +++ arc_summary.pl 2010-03-29 09:32:28.000000000 -0500 > @@ -121,20 +121,20 @@ > > my $arc_size = ${Kstat}->{zfs}->{0}->{arcstats}->{size}; > my $arc_size_MiB = ($arc_size / 1048576); > -my $mfu_size = $target_size - $mru_size; > +my $mfu_size = $arc_size - $mru_size; > my $mfu_size_MiB = ($mfu_size / 1048576); > -my $mru_perc = 100*($mru_size / $target_size); > -my $mfu_perc = 100*($mfu_size / $target_size); > +my $mru_perc = 100*($mru_size / $arc_size); > +my $mfu_perc = 100*($mfu_size / $arc_size); > > print "ARC Size:\n"; > printf("\tCurrent Size:\t\t\t\t%0.2fM (arcsize)\n", $arc_size_MiB); > printf("\tTarget Size: (Adaptive)\t\t\t%0.2fM (c)\n", $target_size_MiB); > printf("\tMin Size (Hard Limit):\t\t\t%0.2fM (arc_min)\n", > $arc_min_size_MiB); > -printf("\tMax Size (Hard Limit):\t\t\t%0.2fM (arc_max)\n", > $arc_max_size_MiB); > +printf("\tMax Size :\t\t\t%0.2fM (arc_max)\n", > $arc_max_size_MiB); > > print "\nARC Size Breakdown:\n"; > printf("\tRecently Used Cache Size:\t%0.2f%%\t%0.2fM (p)\n", $mru_perc, > $mru_size_MiB); > -printf("\tFrequently Used Cache Size:\t%0.2f%%\t%0.2fM (c-p)\n", > $mfu_perc, $mfu_size_MiB); > +printf("\tFrequently Used Cache Size:\t%0.2f%%\t%0.2fM (arcsize-p)\n", > $mfu_perc, $mfu_size_MiB); > print "\n"; > > ### ARC Efficency ### > > ----------- > > > Giving something like this... > > -------- > ARC Size: > Current Size: 992.88M (arcsize) > Target Size: (Adaptive) 512.00M (c) > Min Size (Hard Limit): 81.82M (arc_min) > Max Size : 512.00M (arc_max) > > ARC Size Breakdown: > Recently Used Cache Size: 51.48% 511.18M (p) > Frequently Used Cache Size: 48.52% 481.70M (arcsize-p) > -------- > > Barry > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" Ill mark this up on my todo. Thanks for the feedback & I should have something committed back within the next couple days, possibly even tonight. I never recalculated for this difference as that area of the code was just a formatting fix. But as Jeremy has pointed out, it would have to verify against __FreeBSD_version but since I already pull in the sysctl MIB kern.osreldate I should be able to compare to that and say 700000 or higher make the above correction. As this is mainly ZFS v13 dependent now I don't feel to bad doing what I have stated above. Thanks again, Regards, -- jhell