Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

Free Oracle Tips

HTML Text

 Home
 E-mail Us
 Oracle Articles



 Oracle Training
 Oracle News

 Oracle Forum
 Class Catalog


 Our Staff
 Our Prices
 Help Wanted!

 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 UNIX
 Oracle UNIX
 Linux
 Oracle Linux
 Monitoring
 Remote help

 Remote plans
 Remote
services
 Oracle C++
 Oracle Java
 Apache
 JDeveloper
 App Server

 Applications
 Oracle Forms
 Oracle Portal
 11i Upgrades
 SQL Server
 Oracle Concepts
 HTML-DB Tips
 Software Help

 Remote Help  
 Development  

 Implementation


 Financials Training
 Oracle 11i
 Oracle Apps 11i
 Oracle Workflow
 Oracle AR 11i Class
 Oracle AP 11i class
 Oracle GL 11i class
 Oracle HR 11i class
 Oracle FA 11i class
 11i Project Mgt
 11i procurement
 11i collections


 Oracle Posters
 Oracle Books

 Oracle Tuning Book
 Oracle RAC Book
 Oracle Security
 Easy Oracle Books
 Oracle Scripts
 SQL Server DBA
 SQL Design Patterns
 WISE
 Excel-DB   


 BC Oracle News


 Rednecks!
 Dress code
 Arabian Stallion

 Burleson Arabians
 Guide Horses
 Don Burleson Blog
 Golf & Travel


 Privacy Policy
 

 

 

 
 

Oracle & read ahead cache

Oracle Tips by Burleson Consulting

Question:  I just wanted to check with the experts on "Read ahead cache" on Windows 2003 Sp2 SAN configuration.  Currently my SAN doesn't employ "Read ahead cache" turned on because the nature of the application is high volume very random selects and huge amount of inserts.    Here are my top-5 events from an AWR report:

Top 5 Timed Events
                                                     Pct
Event                          Waits   Time (s) (ms) Time
db file sequential read        445,254 2,735     6 70.0
CPU time                                       650 16.6
enq: TX - row lock contention       95 279    2933  7.1
db file parallel write         421,399 125       0  3.2
db file scattered read         133,905  90       1  2.3

Under what conditions will a enabling the read ahead cache help me?
 

Answer: The read ahead cache is only useful in cases of "db file scattered reads" (i.e. full table scans).  In your example, you only have 2.3% of I/O as scattered reads, and a read-ahead may not help much.

The read ahead caching has many names on different operating systems, and it started on IBM mainframes as "sequential prefetch".

The concept of readahead caching is simple.  Over 90% of I/O latency is consumed in the read-write head movement, as the heads are placed under the target cylinder.  Once in-place, the disk continues to spin and the read-write head can simultaneously transmit back the original block request at the same time as the next sequential block passes below the read-write heads.

For complete details on device-level caching, see my book "Oracle Tuning: The Definitive Reference".

For scan operations (index range scans, index fast full scans, and full-table scans), a read-ahead cache can be very useful for speeding up these "scattered read" operations.

In sum, if your database is requesting adjacent data blocks, the read-ahead cache may improve I/O throughput.  However, using RAID10 (SAME, stripe and mirror everywhere), like with ASM, the blocks are not adjacent, and a read-ahead cache may not be as useful as a database where the data blocks are laid-out sequentially.  Of course, the stripe width influences this decision.

For complete details, see the book "Oracle disk I/O tuning" where we see specific examples.

Placing adjacent blocks together on disk (when you know that they will be accessed sequentially) is analogous to the process of placing high-impact files near the middle absolute track of huge Oracle disks, to minimize read-write head latency:

Placing hit impact files in the middle cylinder reduces read-write head movement.

How to tell of read-ahead caching is right for your Oracle database

As we noted, enabling your read-ahead cache will greatly improve the I/O throughput for scan operations.  In a normal database you should look for "db file scattered reads", and see if the latency is less than "db file sequential reads", which happen on single block fetch operations:

Using WISE to find disk I/O latency

The WISE tool is the easiest way to analyze STATSPACK and AWR disk I/O data in Oracle.  WISE allows you to spot hidden I/O trends and times when full-scan operations are important.

In sum, a transaction that does not require adjacent data block will not benefit from a read-ahead cache, while transactions that perform index range scans or full-table scans will benefit the most from a read-ahead cache.

Also, remember that most Oracle database process a wide range of transactions and an OLTP database which does few "db file scattered reads" may perform lots of full-scans during batch reporting windows.

Hence, you need to compare the costs of enabling your read-ahead cache with the benefits in speeding-up "db file scattered reads".  This can easily be confirmed in a STATSPACK or AWR report.

 
If you like Oracle tuning, see the book "Oracle Tuning: The Definitive Reference", with 950 pages of tuning tips and scripts. 

You can buy it direct from the publisher for 30%-off and get instant access to the code depot of Oracle tuning scripts.


    Need an Oracle Health Check?
  • Do you have bad performance after an upgrade?
     
  • Need to certify that your database follows best practices?

BC Oracle performance gurus can quickly certify every aspect of your Oracle database and provide a complete verification that your database is fully optimized.

 

 

 

 
 
 

Oracle performance tuning book

 

 

Oracle performance tuning software

 
Oracle performance tuning software
 
SearchOracle web site
 
Oracle performance Tuning 10g reference poster
 
Oracle performance tuning webcast
 
Oracle training in Linux commands
 
Oracle training Excel
 
Oracle training & performance tuning books
 

 

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  and include the URL for the page.
 
 


Burleson Consulting

The Oracle of database support


 

Copyright © 1996 -  2007 by Burleson Enterprises, Inc. All rights reserved.

Oracle® is the registered trademark of Oracle Corporation.


Hit Counter