From owner-freebsd-stable@FreeBSD.ORG Mon Mar 29 14:43:15 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 75E661065674 for ; Mon, 29 Mar 2010 14:43:15 +0000 (UTC) (envelope-from bp@barryp.org) Received: from itasca.hexavalent.net (itasca.hexavalent.net [67.207.138.180]) by mx1.freebsd.org (Postfix) with ESMTP id 3887E8FC08 for ; Mon, 29 Mar 2010 14:43:15 +0000 (UTC) Received: from barryp.org (host-145-114-107-208.midco.net [208.107.114.145]) by itasca.hexavalent.net (Postfix) with ESMTPS id 102AF23C2F9 for ; Mon, 29 Mar 2010 09:43:14 -0500 (CDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=barryp.org; s=itasca; t=1269873794; bh=1k+tD91BjWktDgjOId4dJENReXtJgSaJ/6KaU1kyjKQ=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=R814sFmIhJMH 8yvKpGId5wFXmgv7trMHm0286+HO6C+aWD1kNPKJJWO5YrU62IeKFDE56PDKrTehhug KP8gbgvaf7AnRR4ZOTJOvOG3T3YlO9mm8fTfgqCWhbuNdksWjar2fV1S6W3GSqHM7y2 zkV7TSu+XwPF9KIKtRcS+qQiY= Received: from octane.med.und.nodak.edu ([134.129.166.23]) by barryp.org with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.67 (FreeBSD)) (envelope-from ) id 1NwGBK-000KDF-8r; Mon, 29 Mar 2010 09:43:10 -0500 Message-ID: <4BB0BC7C.3000801@barryp.org> Date: Mon, 29 Mar 2010 09:43:08 -0500 From: Barry Pederson User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.8) Gecko/20100227 Lightning/1.0b1 Thunderbird/3.0.3 MIME-Version: 1.0 To: jhell 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> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: FreeBSD Stable Subject: 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: Mon, 29 Mar 2010 14:43:15 -0000 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