dtracing ZFS on FreeBSD

Tom Curry thomasrcurry at gmail.com
Fri Feb 19 18:51:22 UTC 2016


On Fri, Feb 19, 2016 at 1:07 PM, Michael W. Lucas <mwlucas at michaelwlucas.com
> wrote:

> Hi,
>
> I'm trying get Adam Leventhal's dtrace script for measuring latency
> and number of operations on a pool
> (http://dtrace.org/blogs/ahl/2014/08/31/openzfs-tuning/). Asking for
> guidance here because it's a filesystem thing and the dtrace list is
> dead.
>
> The script is:
>
> #pragma D option aggpack
> #pragma D option quiet
>
> fbt::vdev_queue_max_async_writes:entry
> {
>         self->spa = args[0];
> }
> fbt::vdev_queue_max_async_writes:return
> /self->spa && self->spa->spa_name == $$1/
> {
>         @ = lquantize(args[1], 0, 30, 1);
> }
>
> tick-1s
> {
>         printa(@);
>         clear(@);
> }
>
> fbt::vdev_queue_max_async_writes:return
> /self->spa/
> {
>         self->spa = 0;
> }
>
> When I run it:
>
> # dtrace -s q.d zroot
>
> most lines look like this:
>
>      min .--------------------------------. max      | count
>      < 0 :                                : >= 30    | 0
> dtrace: 15857 dynamic variable drops with non-empty dirty list
>
> My reading of dtrace discussions says I'm losing data here. I suspect
> this is the data I'm actually interested in.
>
> Sometimes, the scale gets a marker on it. Pardon the weird characters:
>
>      min .--------------------------------. max      | count
>      < 0 :           █                    : >= 30    | 3438
>
>
> Or there's
>
>      min .--------------------------------. max      | count
>      < 0 :        ▁▂▃▅                    : >= 30    | 19172
>
> Any thoughts on why?
>
> Thanks,
> ==ml
>
> --
> Michael W. Lucas  -  mwlucas at michaelwlucas.com, Twitter @mwlauthor
> http://www.MichaelWLucas.com/, http://blather.MichaelWLucas.com/
>
>
>
For the variable drops you could try increasing the buffer size, I know I
ran into this when I was tracing something very noisy and it definitely
helped.

#pragma D option bufsize=1m

http://dtrace.org/guide/chp-buf.html


More information about the freebsd-fs mailing list