Oracle Mini Mi Sing Physical Io in Oracle Applications
Oracle Mini Mi Sing Physical Io in Oracle Applications
Applications
Logical I/Os are calculated as the sum of Consistent Gets and DB Block
Gets which are further explained as below:
DB Block Gets – these are the number of buffers gotten normally during
update/insert operations and where the information on the segment
header block needs to be updated.
Physical I/Os are part of Logical I/Os. This means that for a typical read
operation on a table, the resulting operation can be a mix of information
gotten from the Buffer Cache and the physical disk (for whatever
information not available in the cache). The information read from the disk
forms physical I/O for the operation, while the total information forms
Logical I/Os for the operation.
We can convert peak Logical I/Os per second to the amount of CPU
required for the application, and we can convert peak Physical I/Os per
second to the number of disks. This leads us to the direction of tuning the
process of disk access to enable better performance. However, it must be
kept be kept in mind, that steps for tuning physical I/O still start from the
very first step of tuning the application first, moving on to the database,
and finally attacking the operating system and hardware.
We can help cost-based optimiser chose between index and table scans
by doing following basic things:
A proper value of the block size along-with other space parameters like
PCTFREE, PCTUSED, INITTRANS, MXTRANS (as explained below) can
help utilize the space effectively thereby reducing I/O.
For a typical OLTP system averaging 1-1.5 Terabytes of data for one
year into production, a block size of 16K can work well to deliver
good performance.
d) Extent size
Never set the extent size smaller than the physical maximum read
size allowed by the operating system. This is important because if
any object were to be scanned, it would mean extra I/O if Oracle has
to issue more than one read request in order to get its single
maximum read.
e) Tablespace
Splitting database across multiple Tablespaces is a common
practice and offers great deal of benefits in terms of backup,
recovery, and the administration tasks getting easier to handle.
Identifying and correcting I/O bottlenecks becomes easy, as the I/O
costs can be isolated across sub-sets of databases.
Following points below indicate areas to tune for achieving this goal:
a) Identifying Hot-spots
Query on dictionary view – V$FILESTAT and V$DBFILE – can get the
following information to read for identifying hot files / Tablespaces
3) Database Fragmentation
Extent / Tablespace Fragmentation: Database segments may be
composed of many non-contiguous extents of disk space. The I/O times
will increase due to non-sequential disk reads and/or because of split
I/Os. The extent fragmentation further results in Tablespace
fragmentation (the Oracle Tablespaces may be composed of many files,
and the Oracle segments within a Tablespace may be composed of
many individual extents; thus resulting in Tablespace fragmentation.
Note: If the dictionary cache hit Ratio is less than 95%, consider
increasing the shared Pool size to an optimum value.
5) Considering Multiple DBWRs
For a large scale Oracle application, multiple database writers should
be considered. The configurable parameter – DB_WRITERS – can be set
in initdb<n>.ora to reflect number of DBWRs. This needs to be
adjusted in an iterative manner i.e. increasing conservatively and
monitoring the results for I/O improvements.
Pointers for System Tuning
Note: Do not put Redo log files on RAID devices considering the
sequential nature of read for Redo logs.
3) Paging / Swapping
Check for excessive paging and/or swapping activities in the system.
Excessive paging and swapping cause high amount of extra I/O
operations. Various system utilities like SAR –r, vmstat etc to monitor
paging/swapping in the system