 |
|
Oracle
db file scattered read
Oracle Tips by Burleson Consulting
|
Here are my notes on
Oracle db file scattered read disk I/O tuning.
The
Oracle
Documentation notes this on db file scattered reads:
"The
db file scattered Oracle
metric event signifies that the user process is reading buffers into the SGA
buffer cache and is waiting for a physical I/O call to return.
A db
file scattered read issues a scatter-read to read the data into
multiple discontinuous memory locations. A scattered read is usually a
multiblock read. It can occur for a fast full scan (of an index) in
addition to a full table scan.
The db file scattered read wait event identifies
that a full table scan is occurring. When performing a full table scan
into the buffer cache, the blocks read are read into memory locations
that are not physically adjacent to each other.
Such reads are called
scattered read calls, because the blocks are scattered throughout
memory.
This is why the corresponding wait event is called 'db file
scattered read'. Multiblock (up to DB_FILE_MULTIBLOCK_READ_COUNT
blocks) reads due to full table scans into the buffer cache show up as
waits for 'db file scattered read'."
Oracle guru David
Aldridge has noted that "db file sequential reads" (full-scan
I/O) can become slower than "db file scattered reads" (single
block gets) on Linux. He notes that full-scan access speed is
aggravated by Oracle willy-nilly block placement in Automated
Storage Management (ASM) and using bitmap freelists (Automated
Segment Storage Management).
Oracle read-ahead caching
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.

The popular
Ion tool is
the easiest way to analyze Oracle cache and disk performance
(db block parallel reads and writes), and Ion
allows you to spot hidden disk I/O performance trends.
Ion is
our favorite Oracle tuning tool, and the only 3rd party
tool that we use. This, and many other Oracle performance metrics are discussed in
my book "Oracle
Tuning" by Rampant TechPress. You can buy it directly from
the publisher and save 30% at
this link:
Also see these notes on Oracle db file
scattered reads:
|