Date: Wed, 17 Feb 2010 03:47:54 -0500 From: jhell <jhell@DataIX.net> To: Jeremy Chadwick <freebsd@jdc.parodius.com> Cc: freebsd-stable@freebsd.org Subject: Re: ZFS tuning [was: hardware for home use large storage] Message-ID: <alpine.BSF.2.00.1002170343470.14189@pragry.qngnvk.ybpny> In-Reply-To: <20100216175946.GA98082@icarus.home.lan> References: <cf9b1ee01002150049o43fced71ucb5776a0a1eaf4cf@mail.gmail.com> <20100215090756.GA54764@icarus.home.lan> <20100215105000.101326yj01j0f64g@webmail.leidinger.net> <20100215122744.GA57382@icarus.home.lan> <20100215161105.14071eiflhc9le68@webmail.leidinger.net> <4B79BA9C.3020402@quip.cz> <alpine.BSF.2.00.1002152024040.74553@pragry.qngnvk.ybpny> <4B7AD0A3.9080701@barryp.org> <20100216175946.GA98082@icarus.home.lan>
next in thread | previous in thread | raw e-mail | index | archive | help
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 (<LOADER>){ >> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.1002170343470.14189>