On Wed, May 31, 2006 at 12:26:55AM +0200, Robert Milkowski wrote:
> Hello zfs-discuss,
> 
>   I noticed on a nfs server with ZFS that even with atime set to off
>   and clients only reading data (almost 100% reads - except some
>   unlinks()) I still can see some MB/s being written according to
>   zpool iostat. What could be the couse? How can I see what is
>   actually being written by ZFS (what files, metadata, etc.)?

You may use my attached zfs_io.d dtrace script.  This will tell you what
object numbers are being written.  You can use zdb to determine the file
names from that.  Obviously, this is a kludge and any real solution
would tell you the file names directly.

--matt
#!/usr/sbin/dtrace -qs

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");
}
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to