Gathering performance statistics with scsi.d

While scsi.d is good for looking at scsi packets and seeing those raw CDBs not many people are really interested in what a SCSI packet looks like, well not enough people if you ask me. However what is much more interesting is how long the scsi packets are taking. Now scsi.d tells you this for each packet but aggregating the data would be are more useful.

: e2big.eu TS 81 $; pfexec /usr/sbin/dtrace -Cs scsi.d -D QUIET -D PERF_REPORT -D REPORT_TARGET \\
-D REPORT_LUN -n tick-1m {printa(@); clear(@); exit(0) }
Hit Control C to interrupt

  qus                                                       1
           value  ------------- Distribution ------------- count    
          131072 |                                         0        
          262144 |@@@@                                     25       
          524288 |@@@@@@@@@@@@                             68       
         1048576 |@@@@@@                                   34       
         2097152 |                                         2        
         4194304 |@@@                                      19       
         8388608 |@@@@@                                    29       
        16777216 |@@@@                                     22       
        33554432 |@@@@@@                                   35       
        67108864 |                                         1        
       134217728 |                                         0        

  fp                                                        2
           value  ------------- Distribution ------------- count    
          262144 |                                         0        
          524288 |                                         3        
         1048576 |                                         1        
         2097152 |@@                                       15       
         4194304 |@@@@@@@@                                 67       
         8388608 |@@@@@@@@@@                               81       
        16777216 |@@@@@@@@                                 65       
        33554432 |@@@@@@@@                                 66       
        67108864 |@@@                                      27       
       134217728 |                                         0        

  fp                                                        0
           value  ------------- Distribution ------------- count    
           65536 |                                         0        
          131072 |                                         27       
          262144 |@                                        485      
          524288 |@@@@@@                                   2901     
         1048576 |@@@@@                                    2203     
         2097152 |@@@@@@@                                  3204     
         4194304 |@@@@@@@@@                                4087     
         8388608 |@@@@@@@@                                 3978     
        16777216 |@@@                                      1606     
        33554432 |@                                        570      
        67108864 |                                         123      
       134217728 |                                         45       
       268435456 |                                         0        

  fp                                                        3
           value  ------------- Distribution ------------- count    
           65536 |                                         0        
          131072 |                                         41       
          262144 |@                                        493      
          524288 |@@@@@@                                   2926     
         1048576 |@@@@                                     2157     
         2097152 |@@@@@@                                   3228     
         4194304 |@@@@@@@@@                                4461     
         8388608 |@@@@@@@@@                                4561     
        16777216 |@@@                                      1634     
        33554432 |@                                        510      
        67108864 |                                         116      
       134217728 |                                         52       
       268435456 |                                         2        
       536870912 |                                         0        

  scsi_vhci                                                 0
           value  ------------- Distribution ------------- count    
          131072 |                                         0        
          262144 |@                                        588      
          524288 |@@@@@                                    4807     
         1048576 |@@@@@@                                   5423     
         2097152 |@@@@@@@                                  6609     
         4194304 |@@@@@@@@@                                8627     
         8388608 |@@@@@@@@@                                8641     
        16777216 |@@@                                      3289     
        33554432 |@                                        1088     
        67108864 |                                         239      
       134217728 |                                         97       
       268435456 |                                         2        
       536870912 |                                         0        


: e2big.eu TS 82 $; 

All the new options are supplied via -D flags to dtrace and they are:

Option Name

Description

QUIET

Be quiet. Don't report any packets seen. Useful when you only want a performance report.

PERF_REPORT

Produce a per HBA performance report when the script complete. The report is an aggregation held in @ so can be printed at regular intervals using a tick probe as in the above example but without the call to exit().

REPORT_TARGET

If producing a peformance report include the target to produce per target report.

REPORT_LUN

If producing a per target report then include the LUN to produce a per lun report.

DYNVARSIZE

Pass this value to the #pragma D option dynvarsize= option. Eg:

-D DYNVARSIZE=64m


The latest version of the script, version 1.15 is here: http://blogs.sun.com/chrisg/resource/scsi_d/scsi.d-1.15

Comments:

Post a Comment:
Comments are closed for this entry.
About

This is the old blog of Chris Gerhard. It has mostly moved to http://chrisgerhard.wordpress.com

Search

Archives
« April 2014
MonTueWedThuFriSatSun
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
    
       
Today