Performance Improvement by tuning Disk Input/Output

Nearly every action that accurse in the Database will result in some type of logical or physical input/output. By proper tuning the components of SGA you can minimize the physical I/O. The Main goal while tuning physical I/O are generally to :1. Minimize physical I/O whenever possible by proper sizing the SGA 2. Perform any remaining I/O as fast as possible. 3. The database blocks that make up database datafile, are read into the database buffer cache by each user’s server process. Measuring Datafile Input/Output:Physical I/O of datafile can be measured by using v$filestat and v$datafile or by using output of report.txt. V$filestat and v$datafile can be used to measure the read and write activity against datafile and tablesapce in the database. Select name,phyrds,phywrts,avgiotim, miniotim, maxiowtm,maxiortm from V$filestat,v$datafile where v$filestat.file#=v$datafile.file#; Following are the description of columns in the above query. Phyrds :No. of physical reads done to the datafile. Phywrts :No. of physical writes done to the datafile, Avgiotim : Average time in 100th of second, spent performing input /output on that datafile. Miniotim:Minimum time in 100th of second spent performing I/O on that datafile. Maxiowtm :- Maximum time in 100th of second spent writing to that datafile, Maxiortm:Max time in 100th of second spent reading from that datafile, The majority of physical read and write are accruing on the system tablespace datafile.It often accurse because the data dictionary tables that oracle uses to perform recursive SQL are located in the system tablespace. But a excessive write activity to the system tablespace may indicate that non-data dictionary segment are stored there. Improving datafile Input/Output. The easiest way to balance the Input/output between the segments in the database is ti allocate the storage for those segments to the appropriate tablespace. At minimum it asks for separating the major components of the database in to their own tablespace and making sure that users are not having system as there default tablespace.

Separating application tables from their associated indexes helps improve performance on busy OLTP system. 4. • • • . this increases I/O performance because multiple set of disk drives heads are brought in to use when a read or write of the datafile is required. Datafile Striping • • • The Idea of separating datafile into distinct devices can be extended further through technique called striping.ora parameter. 2. Datafile can also be manually striped across devices in the absence of a RAID array. Effectively striping the segments across the available devices. Location for index. The easiest way to strip a datafile is to store the datafile in RAID device. Default tablespace for all other databse users. When a datafile is striped it is stored across several devices not just one. 3. A RAID or Redundant array of independent disks consists of several physical disks that can be managed and accessed as if they were one or more physical devices. Therefore placing a datafile on a RAID device implicitly causes the file to be striped across all the devices in the raid. Next a segment is created so that it extents are stored in each of the datafile associated with the tablespace. A further extension of this concept can be segregating segments by functional area like separating accounting tables and indexes from sales table and indexes or separating by size. Performing datafile input/output quickly This can be done in 4 ways:1. Tablespace System :Tools:Users:Temp:RBS:Appl_data:Appl_idx:Description Objects owned by user SYS (data dictionary) Default tablespace for user system. Using Locally managed Tablespace. Datafile striping. Manual striping is created by creating a tablespace made up of several datafile and placing each datafile on a saperatee physical device. when table or index are simultaneously having blocks read and inserted. Location for temporary segments used for sorting. Tuning the Db_file_multiblock_read_count init. Location for rollback segments. By placing high I/O datafile on separate disk drives. Location for application table/Schema.Suggested minimum tablespace configuration.

SQL> Alter tablespace Appl_data 2 add datafile ‘/u02/oradata. DB_FILE_MULTIBLOCK_READ_COUNT Init. STEP 1 :Create the EMP table initial extent:Create Table EMP( Emp_id number. . • This init. SQL> Alter tablespace Appl_data 2 add datafile ‘/u02/oradata. next 4M .dbf’ size 4M).prod/appl_data03.PCTincrease 0) Tablespace Appl_data. size 5M. A LMT uses a bitmap stored in the header of tablespace’s datafile instead of data dictionary to manage the allocation of space with in the tablespace.• Following is an example of SQL statement used to accomplish this for a table. size 5M. Step 2:Next. Step 3 :Manually allocate two new extents for the emp table using the datafile that were created SQL> alter table emp 2 allocate extent 3 (datafile ‘/u02/oradata.dbf’ size 4M). SQL> alter table emp 4 allocate extent (datafile ‘/u02/oradata. First_name Varchar2(30).ora parameter determines the max number of database blocks that are read by a user’s server process when ever full table scan read operation is performed . Locally Managed Tablespace:Datafile input/output can also be educed by use of Locally managed tablespace(LMT).dbf’’ 3. Last_name varchar2(30)) storage ( Initial Add two additional datafile to the tablespace each located on a saperate devices.This makes space allocation /de-allocation much faster as access to data dictionary is system tablespace is not required.ora Parameter.

By setting this high more blocks are accessed for each read thus reducing the total no.The default value is 8 setting this value to greater then 8 benefits most when database blocks are being accessed by full table scan. ******* END ********* • . of I/0. • High vaue for this statistics indicate that your application is performing frequent FTS. • To determine how often you application is performing FTS. SQL> select names.and may benefit from increasing above parameter value. • The Behavior of CBO is also affected by this parameter. Use following Query. If fewer I/O are required to access all the data of table via FTS then CBO may now choose to access table using FTS instead of Previously used index.value from V$sysstat where name =’table scan(long tables).

Sign up to vote on this title
UsefulNot useful