Home > Oracle Database / Applications Tips > Chapter excerpts from Oracle books > Oracle disk I/O tuning: SCSI tuning under Linux and Unix
Oracle Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

CHAPTER EXCERPTS FROM ORACLE BOOKS

Oracle disk I/O tuning: SCSI tuning under Linux and Unix


Mike Ault
08.17.2004
Rating: -2.33- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


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.


SCSI tuning under Linux

Under Linux, the SCSI interface is tuned either by specifying parameters in the boot command of the Grub or Lilo boot file or by specifying options in the /etc/modules.conf file. Let's look at examples of both of these. The relative performance of the interface can be measured in Linux using the hdparm command with the -Tt option. Note that the IEEE1394 interface is treated as a SCSI interface in Linux. The following examples are for tuning the generic SBP2 interface, but the techniques can also be supplied to specific SCSI drivers.

First, let's look at the current settings for the interface. You get those by looking under the LUN number in the /proc/scsi/sbp2 directory. This example used LUN 0.

[root@aultlinux1 root]# cat /proc/scsi/sbp2/0
IEEE-1394 SBP-2 protocol driver (host: ohci1394)
$Rev: 601 $ James Goodwin <jamesg@filanet.com>
SBP-2 module load options:
- Max speed supported: S400
- Max sectors per I/O supported: 255
- Max outstanding commands supported: 8
- Max outstanding commands per lun supported: 1
- Serialized I/O (debug): no
- Exclusive login: no
Now we run a timing test to determine the average speed for the interface as-is (run this several times and average the results):
/dev/sda:
 Timing buffer-cache reads:  128 MB in  3.99 seconds = 32.08 MB/sec
 Timing buffered disk reads:  64 MB in  6.86 seconds =  9.33 MB/sec
[root@aultlinux1 root]# hdparm -Tt /dev/sda
Now we will set the values for the SBP2 options in the /etc/modules.conf file. We are doubling the outstanding commands to 16 and increasing the commands per LUN to 2:
alias parport_lowlevel parport_pc
alias eth0 3c59x
alias usb-controller usb-ohci
alias eth1 tulip
alias ieee1394-controller ohci1394
alias scsi_hostadapter sbp2
options sbp2 sbp2_max_outstanding_cmds=16 sbp2_max_cmds_per_lun=2
Now we reboot so the settings will take effect, then re-check our settings in /proc/scsi/sbp2/0:
[root@aultlinux1 root]# cat /proc/scsi/sbp2/0
IEEE-1394 SBP-2 protocol driver (host: ohci1394)
$Rev: 601 $ James Goodwin <jamesg@filanet.com>
SBP-2 module load options:
- Max speed supported: S400
- Max sectors per I/O supported: 255
- Max outstanding commands supported: 16
- Max outstanding commands per lun supported: 2
- Serialized I/O (debug): no
- Exclusive login: no
Our settings have been modified, now let's re-run the timing test:
[root@aultlinux1 etc]# hdparm -Tt /dev/sda

/dev/sda:
 Timing buffer-cache reads:  128 MB in  4.03 seconds = 35.36 MB/sec
 Timing buffered disk reads:  64 MB in  6.04 seconds = 11.25 MB/sec
From a simple modification, we improved SCSI speed for this device by 11.25/9.33*100= 120.6 percent. Overall, a 20% speed improvement. Subsequently we doubled, quadrupled and eventually got to a setting of 255 for the maximum outstanding commands, the performance peaked at 11.25 MB/sec with 16 as a setting. If the servers being tuned are in a cluster, all of them should have the same settings.

Tuning SCSI under Unix

SCSI tuning under Unix is dependent on the version of Unix involved and the SCSI card or mother board interface being tuned. Let's look at Sun.

On any system, Sun included, the system bus has a fixed bandwidth. If there are too many devices on the bus this will result in more traffic than the bus can handle, which then results in contention and packet loss.

In the Sun Solaris operating system, the prtdiag -v command is used to report on the system bus configuration. By adding up the reported capacities of the devices on the bus reported by prtdiag –v, and seeing if they exceed the capacity of the bus, it is possible to see if the bus is overloaded. Whenever possible, similar cards should be placed on the same board so the interrupts are directed to the same CPU (and associated caches). Table 3-1 shows some typical Sun system bus capacities:

Bus Speed Width Burst Bandwidth Sustained Bandwidth
MBus33MHz64 bit264 MB/s86 MB/s
MBus36MHz64 bit288 MB/s94 MB/s
MBus40MHz64 bit320 MB/s105 MB/s
MBus50MHz64 bit400 MB/s130 MB/s
XDBus40MHz64 bit320 MB/s250 MB/s
XDBus50MHz64 bit400 MB/s312 MB/s
UPA72MHz128 bit1.15 GB/s1 GB/s
UPA83.5MHz128 bit1.3 GB/s1.2 GB/s
UPA100MHz128 bit1.5 GB/s1.44 GB/s
Gigaplane83.5MHz256 bit2.6 GB/s2.5 GB/s
GigaplaneXB100MHz1024 bit12.8 GB/s12.8 GB/s

Figure 3-1: Typical Bus Capacities

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!


Rate this Tip
To rate tips, you must be a member of SearchOracle.com.
Register now to start rating these tips. Log in if you are already a member.




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
Chapter excerpts from Oracle books
Writing single-row and multiple-row subqueries
List the types of SQL subqueries
Using subqueries in SQL
Define SQL subqueries
Oracle 11g: PL/SQL Basics
Oracle 11g: Backup and recovery concepts
Migrating to Oracle: Expert Secrets to Migrate from SQL Server and MySQL
Oracle Database 11g SQL Tuning
Upgrading to Oracle Database 11g
Tuning the Oracle database with initialization parameters

Oracle on Linux
Timeline: Following the Oracle-European Commission trail
Oracle virtualization introduction guide
What Linux flavor should I use for my Linux proof of concept in Oracle?
Will Sun help Oracle eclipse IBM?
Oracle database in the cloud floated at Harvard lab
E-discovery firm swaps out Microsoft SQL for Oracle RAC
Oracle releases VM virtualization templates, boasts Linux momentum
What happened to Oracle's Red Hat challenge?
Oracle Database 11g makes waves at Burlington Coat Factory
Firm dumps MySQL on Red Hat for Oracle Database on Oracle Linux

Oracle database performance problems and tuning
Oracle tutorial library: SearchOracle.com's learning guides
What managers should consider when starting a database scaling project
Oracle releases new database, says 11g upgrade will cut costs
Oracle raises prices on database management packs
Oracle New Year's resolutions, part 1: Advice for navigating 2009
Solving common Oracle errors guide
Oracle 11g data compression
Varchar or number for better performance?
Do statistics on SYS-owned objects hurt performance in 10g?
Inside the Oracle 11g SQL Performance Advisor, part 1

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

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.



Oracle Development Solutions - SQL, J2EE, XML, SOA
HomeNewsTopicsTipsAsk the ExpertsMultimediaWhite PapersProductsBlogs
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2003 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts