From owner-freebsd-stable@FreeBSD.ORG Wed Feb 17 08:48:02 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 835AC106566B for ; Wed, 17 Feb 2010 08:48:02 +0000 (UTC) (envelope-from jhellenthal@gmail.com) Received: from mail-iw0-f175.google.com (mail-iw0-f175.google.com [209.85.223.175]) by mx1.freebsd.org (Postfix) with ESMTP id 3CDD68FC13 for ; Wed, 17 Feb 2010 08:48:01 +0000 (UTC) Received: by iwn5 with SMTP id 5so3130239iwn.9 for ; Wed, 17 Feb 2010 00:48:01 -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=euM4CbQYVmdqBTJA1nWSWyfXNHjE/j8tv0UTka6azlQ=; b=N2KPe115di2qtvNC9Vwga2z046lx30ZO79Mtw799weZrp3a/ASDNI07FSRhdWdLLZW nBLsstXimtLs6VD6UKGgOY+rYO/SqZP77NEovbNCQoSYduCFIgDcUFQ9tWKtt8BrKdeo mHTJGMOe2aJpnLafhCfKMCYeI4HexTASujz3c= 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=WO8Wo9A9UbNpiQjPb3kHgybdYyde/4T9GBUzJu0XfZmq68TeZUntIOO33bDtWdv4/v mfr2zFobfPZl25YqXvGkFrj4vl0iycNAxz9zZ5/pqfSWgdUQL4LEXPYJJu2hftXYV/Am DKvK2u/UQrGVYmEv1ehOC0z/jYfyP30wpqmU4= Received: by 10.231.145.5 with SMTP id b5mr7079418ibv.70.1266396481495; Wed, 17 Feb 2010 00:48:01 -0800 (PST) Received: from centel.dataix.local (ppp-21.195.dialinfree.com [209.172.21.195]) by mx.google.com with ESMTPS id 23sm7940837iwn.15.2010.02.17.00.47.57 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 17 Feb 2010 00:48:00 -0800 (PST) Sender: "J. Hellenthal" Date: Wed, 17 Feb 2010 03:47:54 -0500 From: jhell To: Jeremy Chadwick In-Reply-To: <20100216175946.GA98082@icarus.home.lan> 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> <4B7AD0A3.9080701@barryp.org> <20100216175946.GA98082@icarus.home.lan> 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: freebsd-stable@freebsd.org 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: Wed, 17 Feb 2010 08:48:02 -0000 On Tue, 16 Feb 2010 12:59, freebsd@ wrote: > On Tue, Feb 16, 2010 at 11:06:43AM -0600, Barry Pederson wrote: >> On 2/15/10 7:49 PM, jhell wrote: >> >>> 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 >> >> Nice. How about including relevant lines from /boot/loader.conf, >> maybe something like this tacked on the end of the script (excuse my >> Perl, I'm a Python guy). >> >> ---- >> #### Loader Settings ############# >> open(LOADER, '/boot/loader.conf'); >> print "\n/boot/loader.conf settings:\n"; >> while (){ >> chomp; >> if (/^\s*(zfs|vfs\.zfs|vm\.kmem)/){ >> print "\t$_\n"; >> } >> } >> ---- >> >> Yes, it should more or less duplicate the sysctl values, but it may >> make it more obvious where the settings are coming from, or if the >> user has bad or ignored settings > > Major problems with the above code: > > 1) Opens /boot/loader.conf for rw access; should be read-only > 2) Makes the assumption /boot/loader.conf exists > 3) Does not close the fd > 4) Excessively quotes variables for no justified reason > 5) Makes some bad assumptions about the contents of the file (ex. > comments with the word "zfs" in them would match) > > The code should really be something like what's below. This should > be much more manageable as well (@tunables that is), although I always > worry when using grep()... > > Very nice!, Ill keep this for reference later on. This might just come in handy at some point. But for the sake of arc_summary.pl I feel this is beyond the scope of what its intended use is. See previous email in response to Barry. Thanks Jeremy -- jhell