Problem solve Get help with specific problems with your technologies, process and projects.

Oracle disk I/O tuning: HP-UX SCSI tuning, part 1

The following is part of a series on the different aspects of disk I/O performance and optimization for Oracle databases.

The following is part of a series on the different aspects of disk I/O performance and optimization for Oracle databases. Each tip is excerpted from the not-yet-released Rampant TechPress book, "Oracle disk I/O tuning," by Mike Ault. Check back to the main series page for upcoming installments.

Mike Ault

Mike Ault is one of SearchOracle.com's Oracle Internals experts. Mike is senior Oracle consultant with Burleson Consulting, and one of the leading names in Oracle technology.

To view Mike's expert responses or to ask him a question, click here.


HP-UX SCSI tuning

Much like Sun Solaris, HP has several kernel based tuning parameters that are used to adjust the behavior of to SCSI interface, bus and device.

Probably, the most important is scsi_max_qdepth.

scsi_max_qdepth - This is the maximum number of I/Os that a single SCSI target will queue up for execution. The parameters has a minimum value of 1, a default set value of 8, and a maximum value of 255.

Some SCSI devices support tagged queuing, which means they can have more than one SCSI command outstanding at any point in time. The number of commands that can be outstanding varies by device and is not known to HP-UX. To avoid overflowing this queue, HP-UX will not send more than a certain number of outstanding commands to any SCSI device. This tunable sets the default value for that limit. The default value can be overridden for specific devices using ioctl. The ioctl is a device interface system control that allows commands to be issued to alter specific setpoints on devices; it is not a command line program.

Queue depth is synonymous to the tagged command queuing in other systems. When tagged command queuing is supported by a target, it allows the target to accept multiple SCSI commands for execution. By accepting multiple commands, intelligent on-disk controllers can optimize how the commands are carried out by positioning reads and writes in the order to minimize disk head movement between operations. Some targets can allow up to 256 commands to be stored from different initiators. Once the target command queue is full, the target terminates any additional I/O and returns a QUEUE FULL status to the initiator. Some older targets may support less than 256 commands to be queued, and this is the reason the setting defaults to 8. Why the value is set so low is not explained.

If the system has a combination of devices that support small and larger queue depths, then a queue depth can be set to a value, which would work for most devices. For specific devices, the system administrator can change the queue depth on a per device basis using SIO_SET_LUN_LIMIT in ioctl(). See the HP-UX manual entries on scsictl(1M) for more on how to use ioctl().

This value should only be raised in SCSI devices that have enough memory to support higher queue depth than the default set by HP. Such devices may offer better performance if the queue depth is set to a higher value.

Remember, the queue depth applies to all the SCSI devices that support tag queuing. Setting the queue depth to a value larger than the disk can handle will result in I/Os being held off once a QUEUE FULL condition exists on the disk. A mechanism exists that will lower the queue depth of the device in case of QUEUE FULL condition avoiding infinite QUEUE FULL conditions on that device similar to the process that lowers it to 1 on Sun Solaris. Nevertheless, this mechanism will periodically try higher queue depths and QUEUE FULL conditions will arise.

This parameter should be lowered when the connected SCSI devices support smaller queue depth or for load balancing. However, devices that support higher queue depth may not deliver optimal performance when a lower queue depth value is set.

The other tunable parameter in HP-UX for SCSI is scsi_maxphys, which sets the maximum allowed length of an IO on all SCSI devices. scsi_maxphys has a minimum and maximum setting of 1048576 (one megabyte) except on V-class systems, where it has the range of values: 16777215 and 33554432.

This tunable sets the maximum data size the SCSI subsystem will accept for an I/O. Depending on the device's characteristics and the device driver configuration, the maximum size allowed by the SCSI subsystem for a particular SCSI device might be lower than or equal to this tunable parameters value. It will never be greater.

The only time this parameter can be adjusted above one megabyte is when you have a V-Class system where it can be raised to 32 MB.

Click to buy the book, "Oracle disk I/O tuning," by Mike Ault.


About the author

Mike Ault is a SearchOracle.com expert and a senior Oracle consultant with Burleson Consulting, and one of the leading names in Oracle technology. The author of more than 20 Oracle books and hundreds of articles in national publications, Mike Ault has five Oracle Masters Certificates and was the first popular Oracle author with his landmark book "Oracle7 administration and management." Mike also wrote several of the "Exam Cram" books, and enjoys a reputation as a leading author and Oracle consultant. Ask Mike a question today!


Dig Deeper on Oracle database performance problems and tuning

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide.com

SearchDataCenter

SearchContentManagement

SearchHRSoftware

Close