From owner-freebsd-stable@FreeBSD.ORG Tue Feb 16 01:50:07 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 745F2106566B for ; Tue, 16 Feb 2010 01:50:07 +0000 (UTC) (envelope-from jhellenthal@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 19BFA8FC0A for ; Tue, 16 Feb 2010 01:50:06 +0000 (UTC) Received: by vws20 with SMTP id 20so109775vws.13 for ; Mon, 15 Feb 2010 17:50:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:date:from:to:cc :subject:in-reply-to:message-id:references:user-agent :x-openpgp-key-id:x-openpgp-key-fingerprint:mime-version :content-type; bh=q/aWcoWPQKfQ2U3aewXxR40Sx1l9fc2P0dyr3beKZVQ=; b=P7YEdIKcFiG6UDafQN2CuhZPECMaVFcrdl8Kra/mSZQR+UQ5j+pusLG1dnzfDk65YS jfpypsU+w2K58WjADs2PrWysNX4v9YtpYrOogiHW0mAMIbLVSQqeoZpONRiUyBlacXNZ AHPJG3X+12yqpQJA+zOg1K0ukSGt4YqH2TopU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:x-openpgp-key-id:x-openpgp-key-fingerprint:mime-version :content-type; b=lcxuPkRFNQKhZVW6T+ET2k2N6N0G+XTTFIhUxr9EF2iSh2ai/d4JgKjq/HjE4q9e0F ejvb8r/9HYhBOIvl6XEyI2bxuGFVwRXiOH5Do8ftbSEL1Rn3IXaHAJ3jX/UEmO3PX4Zu 1zv5pJI1tphwbhIrNJjkXUpraYvULDgrwiE3c= Received: by 10.220.121.139 with SMTP id h11mr408035vcr.27.1266285005423; Mon, 15 Feb 2010 17:50:05 -0800 (PST) Received: from centel.dataix.local (ppp-22.34.dialinfree.com [209.172.22.34]) by mx.google.com with ESMTPS id 35sm2500325vws.0.2010.02.15.17.49.55 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 15 Feb 2010 17:50:04 -0800 (PST) Sender: "J. Hellenthal" Date: Mon, 15 Feb 2010 20:49:38 -0500 From: jhell To: Miroslav Lachman <000.fbsd@quip.cz> In-Reply-To: <4B79BA9C.3020402@quip.cz> Message-ID: 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> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-OpenPGP-Key-Id: 0x89D8547E X-OpenPGP-Key-Fingerprint: 85EF E26B 07BB 3777 76BE B12A 9057 8789 89D8 547E MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Alexander Leidinger , FreeBSD Stable , Jeremy Chadwick Subject: Re: ZFS tuning [was: hardware for home use large storage] 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, 16 Feb 2010 01:50:07 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Mon, 15 Feb 2010 16:20, 000.fbsd@ wrote: > Alexander Leidinger wrote: > > [...] > >>> kstat.zfs.misc.arcstats.c >>> kstat.zfs.misc.arcstats.c_min >>> kstat.zfs.misc.arcstats.c_max >> >> c_max is vfs.zfs.arc_max, c_min is vfs.zfs.arc_min. >> >>> kstat.zfs.misc.arcstats.evict_skip >>> kstat.zfs.misc.arcstats.memory_throttle_count >>> kstat.zfs.misc.arcstats.size >> >> I'm not very sure about size and c... both represent some kind of >> current size, but they are not the same. >> >> >> About the tuning I would recommend to depend upon a more human readable >> representation. I've seen someone posting something like this, but I do >> not know how it was generated (some kind of script, but I do not know >> where to get it). > > I think you are referring to this script: > http://cuddletech.com/arc_summary/ > and its FreeBSD version > http://bitbucket.org/koie/arc_summary/changeset/dbe14d2cf52b/ > > It gives output like this: > > # arc_summary.sh > > System Memory: > Physical RAM: 4978 MB > Free Memory : 755 MB > > ARC Size: > Current Size: 1028 MB (arcsize) > Target Size (Adaptive): 1028 MB (c) > Min Size (Hard Limit): 50 MB (zfs_arc_min) > Max Size (Hard Limit): 1205 MB (zfs_arc_max) > > ARC Size Breakdown: > Most Recently Used Cache Size: 93% 963 MB (p) > Most Frequently Used Cache Size: 6% 65 MB (c-p) > > ARC Efficency: > Cache Access Total: 358720716 > Cache Hit Ratio: 97% 350351031 [Defined State for > buffer] > Cache Miss Ratio: 2% 8369685 [Undefined State for > Buffer] > REAL Hit Ratio: 76% 272917080 [MRU/MFU Hits Only] > > Data Demand Efficiency: 96% > Data Prefetch Efficiency: 27% > > CACHE HITS BY CACHE LIST: > Anon: 22% 77179355 [ New Customer, > First Cache Hit ] > Most Recently Used: 45% 158252587 (mru) [ Return > Customer ] > Most Frequently Used: 32% 114664493 (mfu) [ Frequent > Customer ] > Most Recently Used Ghost: 0% 9777 (mru_ghost) [ Return > Customer Evicted, Now Back ] > Most Frequently Used Ghost: 0% 244819 (mfu_ghost) [ > Frequent Customer Evicted, Now Back ] > CACHE HITS BY DATA TYPE: > Demand Data: 1% 4375918 > Prefetch Data: 0% 150148 > Demand Metadata: 76% 267830502 > Prefetch Metadata: 22% 77994463 > CACHE MISSES BY DATA TYPE: > Demand Data: 1% 135956 > Prefetch Data: 4% 400434 > Demand Metadata: 73% 6177748 > Prefetch Metadata: 19% 1655547 > --------------------------------------------- > > > Another useful script is arcstat.pl from > http://blogs.sun.com/realneel/entry/zfs_arc_statistics > There are FreeBSD version floating around but I can't find a link to it, so I > am sending it as attachment. > > It would be nice to have some "standardized" scripts for monitoring & > debugging ZFS issues attached to FreeBSD Wiki page about ZFS tuning. Then > everebody will use the same scripts, same output format. It will be easier to > compare results in discussions etc. > > So if anybody of you have write permissions to Wiki, can you add those two > scripts? (or make some better ;]) > > Understanding to tuning of ZFS is really hard with lack of documentation ;( > > Miroslav Lachman > It is funny that you guys are all of a sudden talking about this, as I was just working on some modifications to the arc_summary.pl script for some better formatting and inclusion of kmem statistics. My intent on the modifications is to make the output more usable to the whole community by revealing the relevant system information that can be included in an email to the lists for diagnosis by others. Previously the output of the script was a little bit groggy, had long lines and did not include relevant "other" system information. Currently I am working on cleaning up the code a little and moving the ZFS Tunable section to the bottom of the output where it will actually contain the values of the sysctl's instead of just being a blank list. I would certainly appreciate any feedback I could get from this & other things you think might be relevant in its output. Thanks for bringing this subject up. As I make final modifications to the script I will keep the below URLs updated and welcome any bug reports or modification requests to me personally. Here is the URLs: http://jhell.googlecode.com/files/arc_summary.pl http://jhell.googlecode.com/files/arc_summary.pl.asc MD5 (arc_summary.pl) = bff13dcf119ff979d9aa52b3d8ae53b9 SHA256 (arc_summary.pl) = a29260946760a89614f888d53d0f188fb24bcd96acd5e0917604d494ed843ada SIZE (arc_summary.pl) = 9453 Example output: - --------------------------------------------------------------------- System Summary OS Revision: 199506 OS Release Date: 703100 Hardware Platform: i386 Processor Architecture: i386 Storage pool Version: 13 Filesystem Version: 3 Kernel Memory Usage TEXT: 8950208 KiB, 8 MiB DATA: 206347264 KiB, 196 MiB TOTAL: 215297472 KiB, 205 MiB FreeBSD 7.3-STABLE #0 r203819M Sun Feb 14 15:40:02 EST 2010 root - --------------------------------------------------------------------- ZFS ARC Summary Report System Memory: Physical RAM: 1009 MiB ZFS Tunable (sysctl): vfs.zfs vm.kmem_size vm.kmem_size_max ARC Size: Current Size: 180 MiB (arcsize) Target Size (Adaptive): 182 MiB (c) Min Size (Hard Limit): 80 MiB (arc_min) Max Size (Hard Limit): 480 MiB (arc_max) ARC Size Breakdown: Recently Used Cache Size: 99% 181 MiB (p) Frequently Used Cache Size: 0% 1 MiB (c-p) ARC Efficiency: Cache Access Total: 32355906 Cache Hit Ratio: 97% 31473948 Cache Miss Ratio: 2% 881958 Actual Hit Ratio: 89% 28801408 Data Demand Efficiency: 99% Data Prefetch Efficiency: 44% CACHE HITS BY CACHE LIST: Anonymous: 7% 2303558 Most Recently Used: 13% 4157073 (mru) Most Frequently Used: 78% 24644335 (mfu) Most Recently Used Ghost: 0% 151893 (mru_ghost) Most Frequently Used Ghost: 0% 217089 (mfu_ghost) CACHE HITS BY DATA TYPE: Demand Data: 73% 23206273 Prefetch Data: 0% 14877 Demand Metadata: 14% 4611670 Prefetch Metadata: 11% 3641128 CACHE MISSES BY DATA TYPE: Demand Data: 23% 206991 Prefetch Data: 2% 18760 Demand Metadata: 53% 471124 Prefetch Metadata: 20% 185083 - --------------------------------------------------------------------- - -- jhell -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iQEcBAEBAgAGBQJLefm5AAoJEJBXh4mJ2FR+2wYIAIpC6zPj4/ioak8TspN1blCV LSNG/JXbqat9/e6EAulBSDaF81AyxKrUNMZxQqgNZ+fobhT4AY3odrlhUNbNX9UX r8juktvG2kXhgpKmjYeP+HSM5KKbXZToBNx+sHwaTGKAybyTBNuhupmrbeGoOZVX tmH6C/ZoOANtxmcHVOGDi/fViC1tTf396iBietaCGtKNJ5S6ziqa3DgJgzrJkSQI 2lYNKqcdusUPyxl22ug24Ifsp3TFn2fFYB22durAaXL9ZPHWruWVD2wQ02EPxdND FmdheGS6OPKEG6Ph2ARTuJpJLZCPoN2EQJivkXI6N2WgsK+QRuZhuylVzDvu/3A= =SSRg -----END PGP SIGNATURE-----