On Thu, Jul 20, 2006 at 12:58:31AM -0700, Trond Norbye wrote:
> I have been using iosoop script (see
> http://www.opensolaris.org/os/community/dtrace/scripts/) written by
> Brendan Gregg to look at the IO operations of my application.
...
> So how can I get the same information from a ZFS file-system?

As you can see, ZFS is not yet fully integrated with the dtrace i/o
provider.  With ZFS, writes are (typically) deferred, so it is
nontrivial to assign each write i/o to a particular application.  If you
are familiar with dtrace, you can use fbt to look at the zio_done()
function, eg. with something like this:

zio_done:entry
/args[0]->io_type == 1 && args[0]->io_bp != NULL/
{
        @bytes["read",
        args[0]->io_bookmark.zb_objset,
        args[0]->io_bookmark.zb_object,
        args[0]->io_bookmark.zb_level,
        args[0]->io_bookmark.zb_blkid != 0] =
            /* sum(args[0]->io_size); */
            count();
}

zio_done:entry
/args[0]->io_type == 2/
{
        @bytes["write",
        args[0]->io_bookmark.zb_objset,
        args[0]->io_bookmark.zb_object,
        args[0]->io_bookmark.zb_level,
        args[0]->io_bookmark.zb_blkid != 0] =
            /* sum(args[0]->io_size); */
            count();
}

END
{
        printf("r/w objset object level blk>0 i/os\n");
        printa("%5s %4d %7d %d %d [EMAIL PROTECTED]", @bytes);
        printf("r/w objset object level blk>0 i/os\n");
}

--matt
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to