Hmmm....so coming back around to the problem we're trying to solve -
You have iostat data and "zpool iostat" data that shows a steady stream
of writes to one or more of your zpools, correct?

You wish to identify the source of those writes, correct?

Try saving this as a file and running it, and please run it in conjunction
with iostat or zpool iostat data, so we can determine what the disparity
is in what is being reported.

***** WARNING ******
I am NOT a ZFS expert. I'm fumbling my way around. I'm not sure if
my use of uio->resid in the script below is a reasonable way to answer
the "how many bytes of write IO am I generating" question. I'm still
chasing that.

-------------- zfsw.d ------------------------
#!/usr/sbin/dtrace -s
#pragma D option quiet

fbt:zfs:zfs_write:entry
{
        @[execname,stringof(args[0]->v_path),args[1]->uio_resid] = count();
}
tick-1sec
{
        printf("%-16s %-40s %-8s %-8s\n","EXEC","PATH","BYTES","COUNT");
        printa("%-16s %-40s %-8d %-@8d\n",@);
        trunc(@); 
        printf("\n");
}
tick-120sec
{
        exit(0);
}


When this is executed in parallel with the other utilities that are reporting
writes, what do the numbers look like? What is the disparity in IOPS
and/or bytes being written?


On Jun 11, 2011, at 1:00 PM, Jim Klimov wrote:

> 2011-06-11 20:42, Jim Mauro пишет:
>> Well we may have missed something, because that dtrace will
>> only capture write(2) and pwrite(2) - whatever is generating the writes
>> may be using another interface (writev(2) for example).
>> 
>> What about taking it down a layer:
>> 
>> dtrace -n 'fsinfo:::write /args[0]->fi_fs == "zfs"/ { 
>> @[execname,args[0]->fi_pathname] = count(); }'
> 
> Seems similar (to my successful last run) - when I do
> something with the system, a few files are shown:
> 
> # time dtrace -n 'fsinfo:::write /args[0]->fi_fs == "zfs"/ { 
> @[execname,args[0]->fi_pathname] = count(); }'
> dtrace: description 'fsinfo:::write ' matched 1 probe
> ^C
> 
>  grep                                                
> /var/svc/log/network-iscsi-target-dcpool:default.log                1
>  fmd                                                 
> /etc/devices/snapshot_cache.tmp                                   2
>  svc.startd                                          
> /var/svc/log/network-iscsi-initiator-dcpool:default.log                3
>  svc.startd                                          
> /var/svc/log/network-iscsi-target-dcpool:default.log                3
>  syslogd                                             /var/adm/messages        
>                                          7
>  sbdadm                                              
> /var/svc/log/network-iscsi-target-dcpool:default.log               22
>  fmd                                                 
> /var/fm/fmd/infolog_hival                                        24
>  Xvnc                                                
> /root/.vnc/bofh-sol:64.log                                       93
>  freeram-watchdog                                    
> /var/log/freeram-watchdog.log.1307810438                        104
>  svc.configd                                         /etc/svc/repository.db   
>                                        232
>  svc.configd                                         
> /etc/svc/repository.db-journal                                  352
> 
> real    1m45.585s
> user    0m1.439s
> sys     0m0.330s
> 
> 

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

Reply via email to