ZFS tuning [was: hardware for home use large storage]

Scot Hetzel swhetzel at gmail.com
Wed Feb 17 09:33:08 UTC 2010


On Wed, Feb 17, 2010 at 2:56 AM, Bartosz Stec <bartosz.stec at it4pro.pl> wrote:
> On 2010-02-17 09:32, Torfinn Ingolfsen wrote:
>>
>> On Wed, 17 Feb 2010 09:19:49 +0100
>> Bartosz Stec<bartosz.stec at it4pro.pl>  wrote:
>>
>>
>>>
>>> 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 script
> doesn't check if L2ARC is used at all, so it will always try compute these
> lines:
>
> printf("\tL2 Hit Ratio:\t\t\t%0.2f%%\t%d\n", 100 * ( $l2_hits / ( $l2_hits +
> $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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch1
Type: application/octet-stream
Size: 3162 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20100217/b6484473/patch1.obj


More information about the freebsd-stable mailing list