It’s easy to set the qdepth with chdev as it is easy to read it out with lsattr:

# chdev -l hdisk100 -a queue_depth=8
hdisk100 changed
# lsattr -El hdisk100 -a queue_depth
queue_depth 8 Queue DEPTH True
But it’s not possible to change the qdepth as long as the hdisk is in use. But you could still change the value in the ODM and wait for the next reboot for the change to apply. But here we have a problem. lsattr already shows the new value while the kernel still uses the old one.

# lsattr -El hdisk100 -a queue_depth
queue_depth 20 Queue DEPTH True
# chdev -l hdisk100 -a queue_depth=8 -P
hdisk100 changed
# lsattr -El hdisk100 -a queue_depth
queue_depth 8 Queue DEPTH True

But what qdepth does the kernel actually use? The only way to get the kernel’s value is to use the kernel debugger:

# echo scsidisk hdisk100 | kdb | grep queue_depth
ushort queue_depth = 0x14;

What we see is the hex value of the qdepth. Use the below command to convert the value to decimal as it would be displayed by lsattr:

# printf “%d\n” 0x14
20

Advertisements