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.

    Requires Free Membership to View

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.


Peripheral buses

The two peripheral buses on Sun systems are Sbus and PCI bus. Sbus typically runs at 20-25MHz and provides 32 or 64 bit sizes. The peak Sbus bandwidth is 200 MB/s. The PCI bus runs at 33 or 66MHz and may be 32 or 64 bit. The peak PCI bus bandwidth is 528 MB/s. Almost all add-on SCSI adapters will plug into the PCI bus.

SCSI bus

SCSI buses on SUN can operate various bandwidths, speeds and throughputs (see table 3-2 to see the various bus specifications for SUN). The prtconf Solaris command is used to report information that can be used to determine the speed of a particular SCSI device. Most of the SCSI systems I have seen in recent years have been SCSI3 based.

Protocol Bus WidthBus SpeedThroughput
SCSI18bit5MHz5MB/s
Fast SCSI, SCSI28bit10MHz10MB/s
Fast Wide SCSI, SCSI316bit10MHz20MB/s
Ultra SCSI8bit20MHz20MB/s
Wide Ultra SCSI, Fast2016bit20MHz40MB/s
Ultra2 SCSI8bit40MHz40MB/s
Wide Ultra2 SCSI, Fast4016bit40MHz80MB/s
Ultra3, Ultra160, Fast8016Bit80MHz160MB/s
Ultra320, Fast16016Bit80MHz320MB/s

Table 3-2: SUN SCSI Specifications

The scsi_options parameter can be set in the /etc/system file to limit bus speed or set other characteristics. You should check device documentation to determine if these settings need to be specified for a specific device. The default scsi_options variable allows the widest range of capabilities that the SCSI host adapter can provide to be supported.

The default scsi_options value on Solaris 2.x works for both 5MB and 10MB devices. The driver will negotiate with each device to determine if it is 10MB transfer capable or not. If they are 10MB devices, 10MB transfer will be used. If not, 5MB transfer will be used.

SCSI subsystem options - on SUN Solaris, a global word of options are available. The bits of the global word are broken down as:

Bit(s) Use
0-2Reserved for debugging/informational level
3Reserved for a global disconnect/reconnect switch
4Reserved for a global linked command capability switch
5Reserved for a global synchronous SCSI capability switch

The rest of the bits are reserved for future use.

The bits, which can be set are set using the hexadecimal values are shown in Table 3-3.

Option tag Option Value Description
SCSI_DEBUG_TGT0x1Debug statements in target drivers
SCSI_DEBUG_LIB0x2Debug statements in library
SCSI_DEBUG_HA0x4Debug statements in host adapters
SCSI_OPTIONS_DR0x8Global disconnect/reconnect
SCSI_OPTIONS_LINK0x10Global linked commands
SCSI_OPTIONS_SYNC0x20Global synchronous xfer capability
SCSI_OPTIONS_PARITY0x40Global parity support
SCSI_OPTIONS_TAG0x80Tagged command support
SCSI_OPTIONS_FAST0x100FAST scsi support
SCSI_OPTIONS_WIDE0x200WIDE scsi support

Figure 3-3: SCIS Options Hexadecimal Values

The values for the various options are added to achieve the desired combination of features. For example, a line in /etc/system that read:

        set scsi_options=0x3f8 
means that the default options would be to allow WIDE SCSI, FAST SCSI, tagged commands, global parity, synchronous transfer, linked commands and global disconnect/reconnect, i.e. all currently supported options.

SCSI chains may be made of single-ended or differential connections. They should not be mixed, as this may damage the equipment. Differential connections permit longer chains, but the hardware is usually more expensive. Single-ended chains must be less than 6 m in length; differential chains must be less than 20 m for synchronous connections or 25 m for asynchronous connections.

A Single ended SCSI connection uses "Normal" electrical signals, uses an open collector to the SCSI bus. The maximum length for SCSI-1 is a 6 meter cable with stubs of max 10cm allowed to connect a device to the main-cable. Most devices are single ended.

A differential SCSI connection uses two wires to drive one signal. It has a maximum cable length of 25 meters. Differential SCSI is electrically incompatible with single ended devices, allowed in SCSI-1 and upwards based systems.

The SCSI target numbers represent attachment points on the SCSI chain. Each target number may include as many as 8 devices (luns or logical unit numbers). Embedded SCSI devices only include one lun.

Higher target numbers receive better service and on a narrow bus, the target priorities run 7 -> 0. On a wide bus, they run 7 -> 0, then 15 -> 8. The host adapter is usually 7. This can cause problems where busy disks and tape devices share a SCSI bus, since tape devices are usually assigned target 6. If possible, isolate tape devices to their own SCSI bus.

If you are running older drives with Solaris 2.7 and above, you may run into a situation where there are many bus over-runs and errors. This is usually caused by having one or more disks on the SCSI bus that improperly implement the tagged queuing option (or don't support it at all!).

For a quick fix, append this line to /etc/system and reboot:

set scsi_options & ~0x80 
This turns off the Tagged Command Queuing. Tagged command queuing has also been seen to cause problems between Suns and some RAID implementations. However, the best fix is to replace the older drives with newer drives that will probably offer higher speed and greater capacity anyway.

Nevertheless, verify that your drives are incapable of supporting tagged queuing before making this change, since this will seriously degrade performance on disks that do properly support tagged command queuing. Setting the SCSI options for the target drives that can't support the option is therefore the preferred solution.

In Solaris 2.4 and later versions, you can set those options per SCSI bus. See your systems man entries or paper manual instructions for isp(7) and esp(7).

For some disks, decreasing the maximum number of queued commands by setting an option for the sd driver (SCSI Driver) using the host configuration variable sd_max_throttle, is all that is necessary:

set sd:sd_max_throttle=10 

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!


This was first published in August 2004

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.