What is the maximum number of commands queued to a LUN

This is not quite a one liner as I'm reusing the code from a previous post to print out the devices in a human readable form other wise it is just a one liner and was when I typed it in.

The question posed here was what is the maximum number of commands sent to a LUN at any one time? Clearly this will max out at the throttle for the device however what was interesting, since the customer had already tuned the throttle down and the problem had gone away was what was their configuration capable of sending to the LUN:

#!/usr/sbin/dtrace -qCs

#define SD_TO_DEVINFO(un) ((struct dev_info \*)((un)->un_sd->sd_dev))

#define DEV_NAME(un) \\
        stringof(`devnamesp[SD_TO_DEVINFO(un)->devi_major].dn_name) /\* ` \*/

#define DEV_INST(un) (SD_TO_DEVINFO(un)->devi_instance)

fbt:\*sd:\*sd_start_cmds:entry  { @[DEV_NAME(args[0]),DEV_INST(args[0])] = max(arg
s[0]->un_ncmds_in_driver) }
END {
        printa("%s%d %@d\\n", @);
}


This produces a nice list of disk devices and the maximum number of commands that have been sent to them at anyone time:

# dtrace -qCs  /var/tmp/max_sd.d -n 'tick-5sec { exit(0) }'
sd2 1
sd0 70

# 

Combine that with the dscript from the latency bubble posting earlier and you can drill down on where your IO is waiting.

Comments:

Hi Chris,

I got the following:
dtrace: failed to compile script ./d: line 12: args[ ] may not be referenced because probe description fbt:\*sd:\*sd_start_cmds:entry matches an unstable set of probes
Where is the problem ? This is Solaris 10 8/07.

Posted by Przemyslaw Bak on July 03, 2008 at 07:41 AM BST #

I don't know why you see that, although I do too on 10 when both sd and ssd are loaded.

If you do s/args[0]/(struct sd_lun \*)arg0/ that should get it to work.

eg:

fbt:\*sd:\*sd_start_cmds:entry { @[DEV_NAME((struct sd_lun \*)arg0),DEV_INST((struct sd_lun \*)arg0)] = max(((struct sd_lun \*)arg0)->un_ncmds_in_driver) }

Posted by Chris Gerhard on July 03, 2008 at 08:24 AM BST #

That works. Thanks Chris ! :-)

Posted by przemol on July 07, 2008 at 03:46 AM BST #

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