[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Versions 3.2 and 4 Performance Tuning Guide

Setting SCSI-Adapter and Disk-Device Queue Limits

AIX has the ability to enforce limits on the number of I/O requests that can be outstanding from the SCSI adapter to a given SCSI bus or disk drive. These limits are intended to exploit the hardware's ability to handle multiple requests while ensuring that the seek-optimization algorithms in the device drivers are able to operate effectively.

For non-IBM devices, it is sometimes appropriate to modify AIX default queue-limit values that have been chosen to handle the worst possible case. The following sections describe situations in which the defaults should be changed and the recommended new values.

Non-IBM Disk Drive

For IBM disk drives, the default number of requests that can be outstanding at any given time is 3. This value is based on complex performance considerations, and no direct interface is provided for changing it. The default hardware queue depth for non-IBM disk drives is 1. If a specific non-IBM disk drive does have the ability to buffer multiple requests, the system's description of that device should be changed accordingly.

As an example, the default characteristics of a non-IBM disk drive are displayed with the lsattr command:

$ lsattr -D -c disk -s scsi -t osdisk 
pvid          none Physical volume identifier      False
clr_q         no   Device CLEARS its Queue on error
q_err         yes  Use QERR bit
q_type        none Queuing TYPE
queue_depth   1    Queue DEPTH
reassign_to   120  REASSIGN time out value
rw_timeout    30   READ/WRITE time out value
start_timeout 60   START unit time out value

The ability to change these parameters is provided through smit (the fast path is chgdsk) and via the chdev command. For example, if your system contained a non-IBM SCSI disk drive hdisk5, the command:

# chdev -l hdisk5 -a q_type=simple -a queue_depth=3

would enable queuing for that device and set its queue depth to 3.

Non-IBM Disk Array

A disk array appears to AIX as a single, rather large, disk drive. A non-IBM disk array, like a non-IBM disk drive, is of class disk, subclass scsi, type osdisk (which stands for "Other SCSI Disk Drive"). Since a disk array actually contains a number of physical disk drives, each of which can handle multiple requests, the queue depth for the disk array device has to be set to a value high enough to allow efficient use of all of the physical devices. For example, if hdisk7 were an eight-disk non-IBM disk array, an appropriate change would be:

# chdev -l hdisk7 -a q_type=simple -a queue_depth=24

If the disk array is attached via a SCSI-2 Fast/Wide SCSI adapter bus, it may also be necessary to change the outstanding-request limit for that bus.

Disk Adapter Outstanding-Request Limits

The SCSI-2 Fast/Wide Adapter supports two SCSI buses; one for internal devices and one for external devices. A limit on the total number of outstanding requests is defined for each bus. The default value of that limit is 40 and the maximum is 128. If an IBM disk array is attached to a SCSI-2 Fast/Wide Adapter bus, the outstanding-request limit for the bus is increased to accommodate the queue depth of the disk array. For a non-IBM disk array, this change must be performed manually. For example, to set the outstanding-request limit of adapter scsi3 to 70, you would use:

# chdev -l scsi3 -a num_cmd_elems=70

In the SCSI-2 High Performance Controller, the maximum number of queued requests is 30. That limit cannot be changed. For that reason, you should ensure that the sum of the queue depths of the devices attached to a SCSI-2 High Performance Controller does not exceed 30.

The original RS/6000 SCSI adapter does not support queueing. It is inappropriate to attach a disk array device to such an adapter.

[ Previous | Next | Contents | Glossary | Home | Search ]