Вы находитесь на странице: 1из 57

IO Waits

Kyle Hailey
Kyle_hailey@hotmail.com
http://perfvision.com/ftp/sb
#.2

Waits Covered in this Section


1. db file sequential read
2. db file scattered read
3. db file parallel read
4. read by other session Standard I/O
5. direct path read
6. direct path write
7. direct path read temp
8. direct path write temp Direct I/O
9. direct path write (lob)
10. file open
11. file identify
12. Local write wait
13. data file init write Special Cases
14. sort segment request

Copyright 2006 Kyle Hailey


#.3

Buffer Cache

Locks

REDO Lib Buffer


Cache Cache

Network

I/O

Copyright 2006 Kyle Hailey


#.4
IO Waits
SGA
Log Library Buffer
Buffer Cache Cache

DBWR

User1

Data Files
Copyright 2006 Kyle Hailey
#.5

Standard Table/Index IO
1. db file sequential read
 Single block read

2. db file scattered read


 Multi block read

3. db file parallel read


 Non-contiguous multi block read

4. read by other session


 Wait for another session to do the io

Copyright 2006 Kyle Hailey


db file sequential read #.6

Buffer Cache
 The top wait
 Single Block Read
 Data via Index and/or Rowid
 Rollback

Select * from emp where empno = 9999;

Shadow
Index on emp.empno
Process
1) Search Buffer Cache for
the block by rowid
2) Fails Note: “sequential” means
3) Reads of disk A sequence like a
• File rowid
• Block

Copyright 2006 Kyle Hailey


db file scattered read
#.7

 Multi Block Read


Buffer Cache  FullTable Scan
 Index Fast Full Scans

SQL> select * from all_objects;

Shadow
Process 1) Search Buffer Cache for the
blocks Note: Scattered Means
2) Fails
Blocks are read and
3) Reads off disk
• File scattered throughout
• Block buffer cache
• Multi Block Read Count

Copyright 2006 Kyle Hailey


db file parallel read #.8

 Process issues multiple single block reads in parallel


 Documentation says only for recovery
Buffer Cache  But seems to happen for normal read ops
 Async Call – wait for all reads to complete

 Examples
 Not contiguous multi block read
 Index full or range scan
 Where values in Select * from emp where
Shadow
Empno in (1,2,3,4,5,6);
Process
1) Search Buffer Cache for
the blocks
2) Fails
3) Reads that block off Disk
Copyright 2006 Kyle Hailey
#.9
Read by other Session
Buffer Cache
Multiple sessions reading the
same data that requires IO
Ex) to users doing a full table scan
at the same time

S1 S2 1. Block not found in cache


2. Read block from disk
3. Found other session already
reading block from disk
4. Wait for the other session to finish
IO

Copyright 2006 Kyle Hailey


#.10

Db file Sequential Read: Statspack


Top 5 Timed Events
~~~~~~~~~~~~~~~~~~ % Total
Event Waits Time (s) Ela Time
------------------------ ------------ ----------- --------
db file scattered read 7,549 5 52.26
CPU time 2 23.29
db file sequential read 884 2 19.11
control file sequential read 154 0 2.68
control file parallel write 255 0 1.87

What SQL ?
What Object ?

Copyright 2006 Kyle Hailey


#.11
Db file sequential read

Copyright 2006 Kyle Hailey


#.12
db file scattered Read

Copyright 2006 Kyle Hailey


#.13
Read by other session

Copyright 2006 Kyle Hailey


IO – Further Investigation #.14

select parameter1, parameter2, parameter3 from v$event_name

NAME P1 P2 P3
----------------------- ----------- --------- --------
read by other session file# block# class#
db file sequential read file# block# blocks
db file scattered read file# block# blocks
direct path read file number first dba block cnt
direct path read temp file number first dba block cnt
direct path write file number first dba block cnt
direct path write temp file number first dba block cnt
db file parallel read files blocks requests
P1 and P2 are the same, file# , block#
We can use P1, P2, P3 from ASH to get more info
Exception:
db file parallel read – p1,p2,p3 not useful
Copyright 2006 Kyle Hailey
#.15

ASH – sequential reads


select
event,
ash.p3,
o.object_name objn,
o.object_type otype,
CURRENT_FILE# filen,
CURRENT_BLOCK# blockn,
ash.SQL_ID
from v$active_session_history ash,
all_objects o
where event like 'db file sequential read'
and o.object_id (+)= ash.CURRENT_OBJ#
order by sample_time;
EVENT P3 OBJN OTYPE FILEN BLOCKN SQL_ID
----------------------- -- ------------------------- ----- ----- ------ -------------
db file sequential read 1 49890 MGMT_METRICS_1HOUR_ INDEX 3 41737
db file sequential read 1 50908 MGMT_DB_SGA_ECM TABLE 3 28489 35at43xqj7bs0
db file sequential read 1 55303 TOTO TABLE 1 60218 7xftj55rvjw9s

Copyright 2006 Kyle Hailey


#.16

ASH – scattered reads


select
event,
ash.p3,
o.object_name objn,
o.object_type otype,
CURRENT_FILE# filen,
CURRENT_BLOCK# blockn,
ash.SQL_ID
from v$active_session_history ash,
all_objects o
where event like 'db file scattered read'
and o.object_id (+)= ash.CURRENT_OBJ#
order by sample_time;
EVENT P3 OBJN OTYPE FILEN BLOCKN SQL_ID
---------------------- -- ------------------------- ----- ----- ------ -------------
db file scattered read 8 9078 WRH$_SYSMETRIC_HISTO TABLE 3 52363
db file scattered read 5 8781 WRI$_ALERT_HISTORY TABLE 3 2676
db file scattered read 8 57 OBJAUTH$ TABLE 1 33993 3t2mk1prj24hu

Copyright 2006 Kyle Hailey


#.17
IO by TBS & File
select io.cnt,
round(io.cnt/(&v_minutes*60),2) aas,
io.event,
io.p1 p1,
f.tablespace_name
from ( select
count(*) cnt,
substr(event,0,25) event,
ash.p1 p1
from v$active_session_history ash
where ( event like 'db file s%' or event like 'direct%' )
and sample_time > sysdate - &v_minutes/(60*24)
group by
event ,
CNT AAS EVENT P1 TABLESPACE
ash.p1
) io, ---- --- ----------------------- --- ----------
dba_data_files f 1 .00 db file sequential read 1 SYSTEM
where 2 .00 db file sequential read 3 SYSAUX
f.file_id = io.p1 38 .06 db file sequential read 6 SOE
Order by io.cnt ; 179 .30 db file sequential read 7 SOEINDEX
#.18
IO by Object
select
count(*) cnt,
CURRENT_OBJ#||' '||o.object_name objn,
o.object_type otype
from v$active_session_history ash,
all_objects o
where ( event like 'db file s%' or event like 'direct%' )
and o.object_id (+)= ash.CURRENT_OBJ#
and sample_time > sysdate - &1/(60*24)
and session_state='WAITING'
group by
CURRENT_OBJ#, o.object_name ,
o.object_type
Order by count(*)

CNT AAS OBJN OTYPE


---- ------- -------------------------
---------------
79
PARTITION .00 52949 ORDER_ITEMS TABLE
97 .00 -1
130 .00 53117 ORD_STATUS_IX INDEX
498 .01 53120 CUST_EMAIL_IX INDEX
IO by Object/tbs/wait
#.19

Select io.cnt cnt,


io.aas aas,
io.event event,
substr(io.obj,1,20) obj,
io.p1 p1,
f.tablespace_name tablespace_name
from ( select
count(*) cnt,
round(count(*)/(&v_minutes*60),2) aas,
substr(event,0,15) event,
CNT AASnvl(o.object_name,decode(CURRENT_OBJ#,-1,0,CURRENT_OBJ#))
EVENT OBJ obj, P1 TABLESPACE_NAME
ash.p1,
--- ---o.object_type
---------------
otype ----------------- --- ---------------
1 .02 db file sequent
from v$active_session_history ash, ORDER_ITEMS_PK 7 SOEINDEX
1 .02 all_objects
db file o sequent 0 3 SYSAUX
2 .03 where db
( eventfile scatter
like 'db file WAIT_OBJECTS
s%' or event like 'direct%' ) 1 SYSTEM
2 .03 db file
and o.object_id sequent ORDER_ITEMS
(+)= ash.CURRENT_OBJ# 6 SOE
3 .05 db file> sysdate
and sample_time sequent CUST_EMAIL_IX
- &v_minutes/(60*24) 7 SOEINDEX
4 .07 db file sequent CUST_LNAME_IX
group by 7 SOEINDEX
6 .10 db file sequent ORD_ORDER_DATE_IX
substr(event,0,15) , 7 SOEINDEX
13 .22 db file o.object_name
CURRENT_OBJ#, sequent , ITEM_ORDER_IX 7 SOEINDEX
25 .42 db file
o.object_type , sequent 0 2 UNDOTBS1
ash.p1 ) io,
dba_data_files f
where f.file_id = io.p1
Order by io.cnt;
select
IO by SQL #.20

sum(cnt) over ( partition by io.sql_id order by sql_id ) tcnt,


io.sql_id,
io.cnt cnt,
io.aas aas,
io.objn objn,
io.obj obj,
io.p1 p1,
f.tablespace_name tablespace_name
from
(
select TCNT SQL_ID CNT AAS OBJN OBJ P1 TABLESPAC
sql_id,
---- ------------- --- ---
count(*) cnt, ----- --------------- --
----------
round(count(*)/(&v_minutes*60),2) aas,
CURRENT_OBJ# objn,
30 0yas01u2p9ch4 1 .01 53113
nvl(o.object_name,decode(CURRENT_OBJ#,-1,0,CURRENT_OBJ#)) obj, ITEM_PRODUCT_IX 7 SOEINDEX
o.object_type otype, 1 .01 53079 ORDER_ITEMS_UK 7 SOEINDEX
ash.p1
28 .16
from v$active_session_history ash 53112 ITEM_ORDER_IX 7 SOEINDEX
58 6v6gm0fd1rgrz
,all_objects o 4 .02 54533 WAIT_OBJECTS 1 SYSTEM
where ( event like 'db file s%' or event like 'direct%' )
54 .30
and o.object_id (+)= ash.CURRENT_OBJ#
0 0 2 UNDOTBS1
and sample_time > sysdate - &v_minutes/(60*24)
group by
CURRENT_OBJ#,
o.object_name ,
o.object_type ,
ash.p1,
sql_id
) io,
dba_data_files f
where
f.file_id = io.p1
Order by tcnt, io.sql_id, io.cnt
#.21
Missing Object IDs
 dba_extents – get object name
select segment_name,
segment_type
from dba_extents
where file_id = P1
and P2 between
block_id and block_id + blocks – 1;

 Dba_extents is notoriously slow


 Options
 Create a table as select – use table
 recreate as object extents change
 Catch blocks in x$bh when waits occur

Copyright 2006 Kyle Hailey


#.22
Copy of dba_extents
Enter value for file: 3
Enter value for block: 6619
OWNER SEGMENT_NAME SEGMENT_TYPE
--------------- -------------------- ------------------
WMSYS LOG_TAB_PK INDEX

Elapsed: 00:00:41.25

create table myextents as select * from dba_extents


Table created.

Elapsed: 00:01:25.73

CNT OWN SEGMENT_NAME SEGMENT_TYPE


--- ---- ---------------- ------------
11 SYS SMON_SCN_TO_TIME CLUSTER
993 SYS _SYSSMU7$ TYPE2 UNDO
150 rows selected.

Elapsed: 00:00:01.03
#.23

IO Solutions
1. Check average read times per file
 Should be between 5-20 ms
 Data in Statspack under “File IO Stats”
2. Check Cache buffer Hit ratio
 Check db_cache_advice 9i and higher
 Data in Statspack under “Buffer Pool Advisory”
 Want to optimize data caching
3. Tune High IO SQL

Copyright 2006 Kyle Hailey


#.24

Step 1a: Ave Read Time


File IO Stats DB/Inst:labsf03 Snaps: 1-2
Tablespace Filename
------------------------ ----------------------------------------------------
Av Mx
Av
Av Rd Rd Av Av Buffer BufWt
Reads Reads/s (ms) Bkt Blks/Rd Writes Writes/s Waits (ms)
---------- ---- ------- ----- --- ------- ------------ -------- ---------- --
SYSTEM /u01/app/oracle/oradata/labsf03/system01.dbf
445 15 0.4 16 1.0 1,157 39 2,744 93.3
USERS /u01/app/oracle/oradata/labsf03/users01.dbf
223 7 0.5 ### 1.0 9,725 324 4 100.0

IO should be under 20ms


Fastest possible is around 7ms
Faster speeds are due to read caching
Copyright 2006 Kyle Hailey
#.25
Step 1c: Ave Read Time
select
to_char(begin_interval_time,'yyyy-mm-dd hh24:mi') snap_time,
file#, readtim/nullif(phyrds,0) avg_read_ms, phyrds
from
SNAP_TIME FILE# AVG_READ_MS PHYRDS
DBA_HIST_FILESTATXS f,
---------------- ---------- ----------- ----
dba_hist_snapshot s
2008-01-05 12:00 9 36.67 39
where f.snap_id=s.snap_id ; 2008-01-05 12:00 10 32.31 39
2008-01-05 13:00 1 11.63 178224
2008-01-05 13:00 2 56.37 2014
2008-01-05 13:00 3 17.38 50668
2008-01-05 13:00 4 9.39 565321
2008-01-05 13:00 5 38.78 41
2008-01-05 13:00 6 28.29 41
2008-01-05 13:00 7 27.44 39
2008-01-05 13:00 8 42.56 39
2008-01-05 13:00 9 36.67 39
IO should be under 20ms 2008-01-05 13:00 10 32.31 39

Fastest possible is around 7ms


Faster speeds are due to read caching
Copyright 2006 Kyle Hailey
#.26
Step 1c: Ave Read Time
select
to_char(begin_time,'yyyy-mm-dd hh24:mi') begin_time,
file_id fid,
average_read_time *10 avgrd_ms,
average_write_time *10 avgwr_ms,
physical_reads pr,
physical_writes pw
BEGIN_TIME FID AVGRD_MS AVGWR_MS PR PW
from ---------------- ---- -------- -------- ---------- ----------

V$FILEMETRIC_HISTORY f 2008-01-30 12:25 1 5.2 2.5 100 24


2008-01-30 12:25 5 80.0 20.0 2 2
order by begin_time; 2008-01-30 12:25 2 36.7 2.0 3 218
2008-01-30 12:25 4 22.8 1.8 89 2754
2008-01-30 12:25 3 22.9 2.6 14 47

IO should be under 20ms


Fastest possible is around 7ms
Faster speeds are due to read caching
Copyright 2006 Kyle Hailey
#.27

Step 2 : Buffer Pool Advisory


Buffer Pool Advisory
Size for Size Buffers for Read Estimated
P Est (M) Factor Estimate Factor Physical Reads
--- -------- ------ ------------ ------ --------------
D 56 .1 6,986 2.3 58,928
D 112 .2 13,972 1.6 42,043
D 224 .4 27,944 1.0 25,772
D 336 .6 41,916 1.0 25,715
D 448 .8 55,888 1.0 25,715
D 596 1.0 74,351 1.0 25,715
D 728 1.2 90,818 1.0 25,715
D 840 1.4 104,790 1.0 25,715
D 952 1.6 118,762 1.0 25,715
D 1,064 1.8 132,734 1.0 25,715

Copyright 2006 Kyle Hailey


#.28
Step 3: Find Top I/O SQL
select count(*),sql_id, event
from v$active_session_history
where event in ('db file sequential read',
'db file scattered read',
'db file parallel read')
group by sql_id, event
order by count(*);
COUNT(*) SQL_ID EVENT
--------- ------------- ------------------------
10 8hk7xvhua40va db file sequential read
335 3hatpjzrqvfn7 db file sequential read
343 0uuqgjq7k12nf db file sequential read
481 db file scattered read
549 75621g9y3xmvd db file sequential read
1158 db file sequential read
1311 0bzhqhhj9mpaa db file sequential read
1523 41zu158rqf4kf db file sequential read
1757 Copyright
0yas01u2p9ch4
2006 Kyle Haileydb file sequential read
#.29
Step 3: OEM find top SQL

Copyright 2006 Kyle Hailey


#.30

IO Solutions
 Check
 FileIO response times
 Buffer Cache Hit Ratio

 Always Check SQL to Tune

Copyright 2006 Kyle Hailey


#.31

IO Configuration Issues
 Unix Buffer Cache
 Disk Spindles
 Raid 5

Copyright 2006 Kyle Hailey


Unix File Buffer Cache
#.32

Machine Memory
Unix File SGA
Cache

If average IO read times are under


7ms them probably coming from
Unix File Cache

Copyright 2006 Kyle Hailey


#.33
IO Histograms

IO at > 1ms comes


From Unix File Cache

Copyright 2006 Kyle Hailey


#.34

IO Throughput
 IO Operations/Sec
 150 IOPS/sec optimistic

Large Disks – Few IOPS

Small Disks – Many IOPS

Copyright 2006 Kyle Hailey


#.35

Disk 2Gb vs 70GB


Seagate Seagate
Barracuda 4LP Cheetah 73LP
Capacity 2.16GB 73.4GB
Rotation Speed 7200rpm 10000rpm
Rotational Delay(avg) 4.1ms 3ms
Time to read 32Kb 6ms 3ms
Seek Time (avg) 9.4ms 4.9
Total time for Single I/O 19.5ms 10.9ms
I/O per second 51 92
(conservative)
IOPs/sec per 100GB 2550 126
Copyright 2006 Kyle Hailey
#.36

Raid 5
http://www.miracleas.com/BAARF/BAARF2.html

B – Battle
A – Against
A – Any
R – Raid
F - Five

Copyright 2006 Kyle Hailey


Direct I/O WAITS
#.37

Direct I/O :
This mechanism lets the client bypass the buffer cache for
I/O intensive operations.
The disk blocks are written into and read from process
private memory.
 direct path read :
 Parallel Query
 direct path write
 sqlldr
 loading/reading LOBs
 parallel DMLs
 create table as select
 create index
 direct path read temp , direct path write temp
 Sorting

Copyright 2006 Kyle Hailey


#.38

Direct IO
Shadow
Process

PGA
Sort Area Buffer Cache
Direct Path
PQO Reads

Copyright 2006 Kyle Hailey


#.39
direct path read
 Parallel Query select parameter1, parameter2, parameter3
from v$event_name
 See v$px_session where name='direct path read';
PARAMETER1 PARAMETER2 PARAMETER3

Shadow ---------- ---------- ----------


file number first dba block cnt
Process

PGA Buffer Cache


PQO
X

_serial_direct_read = true Copyright 2006 Kyle Hailey


Further Investigation ASH #.40

select
session_id sid,
QC_SESSION_ID qsid,
ash.p3,
CURRENT_OBJ#||' '||o.object_name objn,
o.object_type otype,
CURRENT_FILE# fn,
CURRENT_BLOCK# blockn,
ash.SQL_ID
from v$active_session_history ash,
all_objects o
where event like 'direct path read'
and o.object_id (+)= ash.CURRENT_OBJ#
Order by sample_time;
----- ----- ---- ----------- ------ -- ------
-------------
SID QSID P3 OBJN OTYPE FN BLOCKN SQL_ID
--- ---- -- ----- ------ -- ------ -------------
149 152 8 TOTO TABLE 1 194072 4gp8tg0b2s722
144 152 8 TOTO TABLE 1 192304 4gp8tg0b2s722
60 152 8 TOTO TABLE 1 190592 4gp8tg0b2s722
54 152 6 TOTO TABLE 1 201274 4gp8tg0b2s722
149 152 8 TOTO TABLE 1 198552
Copyright 2006 Kyle Hailey 4gp8tg0b2s722
#.41
PQO - ASH
select
ash.SQL_ID,
QC_SESSION_ID qsid,
count(*) cnt,
count (distinct session_id) deg,
nvl(o.object_name,to_char(CURRENT_OBJ#)) obj,
o.object_type otype,
decode(session_state, 'WAITING',event,'CPU') event
from v$active_session_history ash,
SQL_ID QSID CNT DEG OBJ OTYPE EVENT
all_objects o
where -------------
o.object_id (+)= ---- ---- --- ------------ -----
ash.CURRENT_OBJ#
--------------------------
and qc_session_id is not null 42
6rvy3wj2u0h6u 123 4 WAIT_OBJECTS TABLE direct path read
group by qc_session_id, 123
sql_id, o.object_name,
3 3 WAIT_OBJECTS TABLE CPU
o.object_type, CURRENT_OBJ#,
123 96 4 event,
0 session_state db file sequential read
Order by qc_session_id, 123
sql_id 9 4 0 read by other session
123 2 2 0 CPU
7p3jt75phub2d 144 386 4 WAIT_OBJECTS TABLE PX Deq Credit: send blkd
144 4 3 WAIT_OBJECTS TABLE PX qref latch
144 37 1 WAIT_OBJECTS TABLE db file sequential read
144 3 2 WAIT_OBJECTS TABLE direct path read
144 70 1 WAIT_OBJECTS TABLE CPU
144 21 4 0 PX Deq Credit: send blkd
#.42

direct path write


 Occurs when: select parameter1, parameter2, parameter3
from v$event_name
 insert/*+ APPEND */ where name='direct path write';
 sql*loader direct=y PARAMETER1 PARAMETER2 PARAMETER3
---------- ---------- ----------
 Create table as select
file number first dba block cnt

Shadow DBWR
Process

PGA

DATA
Buffer Cache

Copyright 2006 Kyle Hailey


Direct Path Read Temp #.43

Direct Path Write Temp


select parameter1, parameter2, parameter3
 Sorting from v$event_name
where name in ('direct path write temp‘,
 Write to Temp ‘direct path read temp’);
PARAMETER1 PARAMETER2 PARAMETER3
 Read from Temp ---------- ---------- ----------
file number first dba block cnt
file number first dba block cnt

Shadow
Process

PGA

TEMP DATA
Buffer Cache

Copyright 2006 Kyle Hailey


#.44

Further investigation
“real time“ can use Select
su.username,
su.segtype,
s.sql_id,
Note: SQL_ID
doesn’t seem filled su.blocks
in for from v$sort_usage su,
v$sort_usage.sql_id v$session s
Where
s.saddr = su.session_addr and
s.serial# = su.session_num;
USERNAME SEGTYPE SQL_ID BLOCKS
--------- ------- ------------- ------
SYS SORT 3xp88dstadjs4 109440
Copyright 2006 Kyle Hailey
#.45

sort segment request


 SMON allocates sort space in Temp
Tablespace
 If SMON is busy this can cause waits for sort
space
 SMON may be stuck rolling back

Copyright 2006 Kyle Hailey


#.46
file open
 Args
 P1 fib
 P2 iov
 P3 0

 Wait on an open file


 The time it takes to open the file
 Times should be order of a block read
 To tune, try pre-opening files
 Leave sessoins connected
 High reconnection rates can exacerbate
 Can try holding log files open
 (see script from Steve Adams)
Copyright 2006 Kyle Hailey
#.47

file identify
 The time it takes to identify a file so that it can
be opened later.
 Datafile should be identified just once
 Logfiles are identified every checkpoint
 Reduce checkpoints
 Arguments
 p1 fib
 p2 filename
 p3 opcode (1 test for create, 2 get details)

Copyright 2006 Kyle Hailey


#.48

Data file init write


 When autoextend is set and many extensions
are happening

Copyright 2006 Kyle Hailey


#.49

Local Write Wait


 Truncating a table
 Wait for Data Cache to be cleared of all
blocks of truncated table
 Wait by shadow for DBWR

 If a problem try
 GTT
 Reduce fast_start_mttr_target

Copyright 2006 Kyle Hailey


#.50
Further Investigation
select * from v$event_name
where name = ‘local write wait'
NAME P1 P2 P3
----------------- ----- ------ -----
local write wait file# block#
select
ash.p1,ash.p2, ash.SQL_ID, count(*)
from v$ash ash
where event='local write wait'
P1 P2 SQL_ID COUNT
group by
--- -- ------------- -----
ash.p1,ash.p2, ash.SQL_ID; 201 2 0q8k9xfmz0k2k 194
201 5 0q8k9xfmz0k2k 34
201 6 0q8k9xfmz0k2k 9
201 4 0q8k9xfmz0k2k 10
Copyright 2006 Kyle Hailey
#.51
Temporary File #’s
SQL> select file# from v$datafile;
FILE#
----------
Wait Temporary File#’s =
1
2 Db_files + file#
3
SQL> show parameters db_files
4
5 NAME VALUE
6 ---------- -------------
7
8 db_files 200
SQL> select file# from v$tempfile;
FILE#
---------- File# 201 = v$tempfile 1
2 Copyright 2006 Kyle Hailey
1
#.52

Local Write Wait:extent allocation


CREATE TEMPORARY TABLESPACE "NEWTEMP"
TEMPFILE '/d3/temp01.dbf' SIZE 100M
AUTOEXTEND ON
EXTENT MANAGEMENT LOCAL UNIFORM SIZE 64K;

ALTER DATABASE DEFAULT


TEMPORARY TABLESPACE newtemp;

select a.*, b.*


from dba_objects a, dba_objects b
order by a.owner
Copyright 2006 Kyle Hailey
Local Write Waits
#.53

Copyright 2006 Kyle Hailey


#.54

Local Write Wait: Solutions


 Truncating a table
 Reducecache size
 Use GTT

 Temporary Table Space Allocations


 Increase extent size

Copyright 2006 Kyle Hailey


#.55

Summary I/O
 Buffer Cache IO
 db file sequential read
 db file scattered read
 db file parallel read

 Tune
 I/O’s
should be 5-15ms
 Check Buffer Cache Advisory
 Tune SQL

Copyright 2006 Kyle Hailey


#.56

Summary Direct I/O


 direct path read : PQO
 direct path write : direct path operations
 direct path read temp: sorts
 direct path write temp: sorts
 direct path write (lob) : stored NOCACHE

Copyright 2006 Kyle Hailey


#.57

IO Summary Other
 sort segment request : SMON occupied
 file open : log files or session reconnects
 file identify : log files or session reconnects
 local write wait –
 Temp extensions
 Truncates
 data file init write – data file extension

Copyright 2006 Kyle Hailey