Date: Wed, 17 Feb 2010 03:27:36 -0600 From: Scot Hetzel <swhetzel@gmail.com> To: jhell <jhell@dataix.net>, Bartosz Stec <bartosz.stec@it4pro.pl> Cc: freebsd-stable@freebsd.org Subject: Re: ZFS tuning [was: hardware for home use large storage] Message-ID: <790a9fff1002170127s153a6813p5e92055dc5d94ba2@mail.gmail.com> In-Reply-To: <4B7BAF59.7040407@it4pro.pl> References: <cf9b1ee01002150049o43fced71ucb5776a0a1eaf4cf@mail.gmail.com> <alpine.BSF.2.00.1002152024040.74553@pragry.qngnvk.ybpny> <4B7AD0A3.9080701@barryp.org> <20100216175946.GA98082@icarus.home.lan> <20100216200511.GA95812@server.vk2pj.dyndns.org> <20100216215637.GA4299@icarus.home.lan> <alpine.BSF.2.00.1002170241080.14189@pragry.qngnvk.ybpny> <4B7BA6A5.9020306@it4pro.pl> <20100217093237.fe4b4e14.torfinn.ingolfsen@broadpark.no> <4B7BAF59.7040407@it4pro.pl>
next in thread | previous in thread | raw e-mail | index | archive | help
--001636283dce02a68e047fc8769e Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Wed, Feb 17, 2010 at 2:56 AM, Bartosz Stec <bartosz.stec@it4pro.pl> wrot= e: > On 2010-02-17 09:32, Torfinn Ingolfsen wrote: >> >> On Wed, 17 Feb 2010 09:19:49 +0100 >> Bartosz Stec<bartosz.stec@it4pro.pl> =A0wrote: >> >> >>> >>> So here's my reply (last line seems most interesting ;) : >>> >> >> [...snipped...] >> >>> >>> Illegal division by zero at ./arc_summary.pl line 242. >>> >> >> FWIW, I also got this line when I ran this script on my idle zfs server. >> > > I'm not a PERL programmer (or programmer at all ;), but what I see is scr= ipt > doesn't check if L2ARC is used at all, so it will always try compute thes= e > lines: > > printf("\tL2 Hit Ratio:\t\t\t%0.2f%%\t%d\n", 100 * ( $l2_hits / ( $l2_hit= s + > $l2_misses )), $l2_hits ); > printf("\tL2 Miss Ratio:\t\t\t%0.2f%%\t%d\n", 100 * ( $l2_misses / ( > $l2_hits + $l2_misses )), $l2_misses ); > printf("\tL2 Feeds Ratio:\t\t\t%0.2f%%\t%d\n", 100 * ( $l2_feeds / ( > $l2_hits + $l2_misses )), $l2_feeds ); > > Without active L2ARC it will always generate divide at zeo error, so it > seems that additional check for usable L2ARC values is needed at first > place. > The attached patch fixes the divide by zero errors. Scot --001636283dce02a68e047fc8769e Content-Type: application/octet-stream; name=patch1 Content-Disposition: attachment; filename=patch1 Content-Transfer-Encoding: base64 X-Attachment-Id: f_g5rwz9800 LS0tIGFyY19zdW1tYXJ5LnBsLW9yaWcJMjAxMC0wMi0xNyAwNzozMDo0OS4wMDAwMDAwMDAgKzAw MDAKKysrIGFyY19zdW1tYXJ5LnBsCTIwMTAtMDItMTcgMDM6MTA6MzEuODA4OTYwNjM1ICswMDAw CkBAIC0yMTAsNiArMjEwLDcgQEAKICMjIyMgTDIgQVJDIFN0YXRzIFN5c2N0bCdzICMjIyMjIyMj IyMjIyMKIG15ICRsMl9oaXRzID0gJHtLc3RhdH0tPnt6ZnN9LT57MH0tPnthcmNzdGF0c30tPnts Ml9oaXRzfTsgIyB1c2VkCiBteSAkbDJfbWlzc2VzID0gJHtLc3RhdH0tPnt6ZnN9LT57MH0tPnth cmNzdGF0c30tPntsMl9taXNzZXN9OyAjIHVzZWQKK215ICRsMl9oaXRzX21pc3NlcyA9ICRsMl9o aXRzICsgJGwyX21pc3NlczsgIyB1c2VkCiBteSAkbDJfZmVlZHMgPSAke0tzdGF0fS0+e3pmc30t PnswfS0+e2FyY3N0YXRzfS0+e2wyX2ZlZWRzfTsgIyB1c2VkCiBteSAkbDJfcndfY2xhc2ggPSAk e0tzdGF0fS0+e3pmc30tPnswfS0+e2FyY3N0YXRzfS0+e2wyX3J3X2NsYXNofTsKIG15ICRsMl93 cml0ZXNfc2VudCA9ICR7S3N0YXR9LT57emZzfS0+ezB9LT57YXJjc3RhdHN9LT57bDJfd3JpdGVz X3NlbnR9OyAjIHVzZWQKQEAgLTIzOCw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hdGlvOlx0XHRcdFVua25vd25c dCVkXG4iLCAkbDJfd3JpdGVzX2Vycm9yICk7Cit9CiBwcmludCAiXG5cbiI7CiAKICMjIyMgVHVu YWJsZXMgIyMjIyMjIyMjIyMjIyMjIyMjIyMjCg== --001636283dce02a68e047fc8769e--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?790a9fff1002170127s153a6813p5e92055dc5d94ba2>