SlideShare a Scribd company logo
1 of 69
ASH – Active Session History
Feel the Power
Kyle Hailey
http://perfvision.com
#.2
Copyright 2006 Kyle Hailey
ASH
Whole New Paradigm in
Technology
The Power of ASH lies in
Simplifying Performance Tuning
 Totally new and exciting methodology
 Cheaper, Quicker, Richer and better tasting too
#.3
Copyright 2006 Kyle Hailey
Why should you care?
Because ASH can Change your life …
 10g immediately Accessible
 Geeks: Via scripts in SQL (?/rdbms/admin/ashrpt.sql)
 Managers : Graphical OEM 10g
 Stuck on Oracle 7,8,9 ?
… my apologies because 10g rocks, but …
no worries, the data is accessible for you too via scripts
http://perfvision.com/sash.php
#.4
Copyright 2006 Kyle Hailey
ASH uses Sampling
New Paradigm
 Clear Vision of the future
 Use new sampling technology
 Lets go of the need to know 100%
 Statistical approximation
 Cheaper
 Richer Multidimensional Data
 Much more powerful, identifies
 SQL
 Sessions
 Objects
 Machine
 User
#.5
Copyright 2006 Kyle Hailey
To identify Players before ASH
 Sessions
 # sessions x (# wait events + statistics)
 Example (150 x (800+200) = 150,000 )
 SQL
 v$sql
 Could be 10000s
 Takes out latches that compete with other sql executions
 Objects
 V$segstat 9i+
 Could be 1000s of objects
Expensive !
#.6
Copyright 2006 Kyle Hailey
ASH – Intelligence for the new
Millennium
 Intelligently Collects Data
 It self adjusts for your needs
 More activity, more data collected
 Less activity, less data collected
 Those old methods collected everything
 Obfuscated the problem, too many statistics too late
 Costly
 Too Granular – once an hour ?! Give me a break
ASH Samples Session State
TIME?? ?? ?? ?? ??
Sessions change a lot quicker but can get the main
picture via sampling by sampling faster
Every secondEvery second
10:00:00 10:00:01 10:00:02 10:00:03 10:00:04 10:00:05
#.8
Copyright 2006 Kyle Hailey
Sampling is like taking
Pictures
#.9
Copyright 2006 Kyle Hailey
If happens a lot or for long …
we’ll catch it, guaranteed
• Long running queries easily foundLong running queries easily found
• Short high execution queries found most of the timeShort high execution queries found most of the time
• Short low execution queries rarely foundShort low execution queries rarely found
Produces a good representation of load on DBProduces a good representation of load on DB
#.10
Copyright 2006 Kyle Hailey
Session States
IO CPU IdleWait
WorkWork
LatencyLatency
ContentionContention
#.11
Copyright 2006 Kyle Hailey
IDLE
 Example : SQL*Net Message from Client
 10g
 9i or below – just have to keep track
 Statspack STATS$IDLE_EVENT
select name
from v$event_name
where wait_class='Idle';
58 Rows
#.12
Copyright 2006 Kyle Hailey
CPU
 ASH: SESSION_STATE = “ON CPU”
 ASH: wait_time > 0
10g: v$session
9i: v$session_wait
w.wait_time != 0 /* on CPU */ and
s.status='ACTIVE' /* ACTIVE */
Identifying CPU via v$session_wait isIdentifying CPU via v$session_wait is
a huge break througha huge break through
#.13
Copyright 2006 Kyle Hailey
IO
 ASH: SESSION_STATE=‘WAITING’
&
 10g: WAIT_CLASS=‘User I/O’
 9i:
 Look at 10g for ideas
 db file sequential read
 db file scattered read
 db file parallel read
 direct path read
#.14
Copyright 2006 Kyle Hailey
WAITING
 ASH: SESSION_STATE=‘WAITING’
 ASH: WAIT_TIME <= 0
 WAIT_CLASS
1. Administrative
2. Application
3. Cluster
4. Commit
5. Concurrency
6. Configuration
7. Network
8. Other
9. Scheduler
10. System I/O
 800+ WAIT
Session 1
Session 2
Session 3
Session 4
TIME
Samples for all users
10:15:00 10:15:01 10:15:02 10:15:03 10:15:04 10:15:05 10:15:06 10:15:07
#.16
Copyright 2006 Kyle Hailey
v$active_session_history
SESSION_ID NUMBER
SESSION_SERIAL# NUMBER
USER_ID NUMBER
SERVICE_HASH NUMBER
SESSION_TYPE VARCHAR2(10)
PROGRAM VARCHAR2(64)
MODULE VARCHAR2(48)
ACTION VARCHAR2(32)
CLIENT_ID VARCHAR2(64)
EVENT VARCHAR2(64)
EVENT_ID NUMBER
EVENT# NUMBER
SEQ# NUMBER
P1 NUMBER
P2 NUMBER
P3 NUMBER
WAIT_TIME NUMBER
TIME_WAITED NUMBER
CURRENT_OBJ# NUMBER
CURRENT_FILE# NUMBER
CURRENT_BLOCK# NUMBER0
SQL_ID VARCHAR2(13)
SQL_CHILD_NUMBER NUMBER
SQL_PLAN_HASH_VALUE NUMBER
SQL_OPCODE NUMBER
QC_SESSION_ID NUMBER
QC_INSTANCE_ID NUMBER
SAMPLE_ID NUMBER
SAMPLE_TIME TIMESTAMP(3) When
Session
SQL
Wait
SESSION_STATE VARCHAR2(7)
WAIT_TIME NUMBER
State
TIME_WAITED NUMBER
Duration
#.17
Copyright 2006 Kyle Hailey
Groupings – Top Consumer
SESSION_ID
SESSION_SERIAL# (signal SID reuse)
SESSION_TYPE (FOREGROUND,BACKGROUND)
CURRENT_OBJ#
CURRENT_FILE#
CURRENT_BLOCK#
USER_ID (SYS, SYSTEM, SCOTT etc)
SERVICE_HASH (OE,GL,HR)
PROGRAM (SQL, JDBC, Forms etc)
MODULE.ACTION(PLSQL tagging)
CLIENT_ID (identifying users in a session pool)
SQL_ID
QC_SESSION_ID - Query Coordinator
QC_INSTANCE_ID – RAC
EVENT + P1, P2, P3
#.18
Copyright 2006 Kyle Hailey
Amazing things YOU can do with
ASH
Consumers
 Top Session
 Top User
 Top SQL
 Top Object
 Top Module.Action
 Top Program
 Top Service
 Top Client
 Top Wait
No machine  - collect on logon trigger
X
Resources
• CPU
• Waits
• Event (800*)
• I/O
• File
• Block
• Time
Find top consumers by resource usage
#.19
Copyright 2006 Kyle Hailey
Select
session_id,
count(*)
from
v$active_session_history
where
session_state= ‘ON CPU‘ and
SAMPLE_TIME > sysdate – (5/(24*60))
group by
session_id
order by
count(*) desc;
Select
session_id,
count(*)
from
v$active_session_history
where
session_state= ‘ON CPU‘ and
SAMPLE_TIME > sysdate – (5/(24*60))
group by
session_id
order by
count(*) desc;
Top CPU Session
Who is the rogue session ?
#.20
Copyright 2006 Kyle Hailey
Results Top CPU Session
SESSION_ID COUNT(*)
---------- ----------
265 256
264 15
257 12
271 12
276 1
SESSION_ID COUNT(*)
---------- ----------
265 256
264 15
257 12
271 12
276 1
SESSION_ID COUNT(*)
---------- ----------
265 256
264 15
257 12
271 12
276 1
#.21
Copyright 2006 Kyle Hailey
CPU with Bars
SESSION_ID COUNT(*) % Bar
---------- ---------- ---------- ------------
257 75 25 |*** |
263 62 21 |** |
256 32 11 |* |
264 9 3 | |
277 3 1 | |
258 1 0 | |
280 1 0 | |
SESSION_ID COUNT(*) % Bar
---------- ---------- ---------- ------------
257 75 25 |*** |
263 62 21 |** |
256 32 11 |* |
264 9 3 | |
277 3 1 | |
258 1 0 | |
280 1 0 | |
Bar shows 10% incrementsBar shows 10% increments
#.22
Copyright 2006 Kyle Hailey
Select
session_id,
count(*)
from
v$active_session_history
where
session_state=‘WAITING’ and
SAMPLE_TIME > SYSDATE - (5/(24*60))
group by
session_id
order by
count(*) desc;
Select
session_id,
count(*)
from
v$active_session_history
where
session_state=‘WAITING’ and
SAMPLE_TIME > SYSDATE - (5/(24*60))
group by
session_id
order by
count(*) desc;
Top Waiting Session
 Top Waiting Session in last 5 minutes
#.23
Copyright 2006 Kyle Hailey
SESSION_ID COUNT(*)
---------- ----------
272 224
254 8
249 5
276 5
277 4
270 1
SESSION_ID COUNT(*)
---------- ----------
272 224
254 8
249 5
276 5
277 4
270 1
Top Waiting Session Results
#.24
Copyright 2006 Kyle Hailey
Top SQL from ASH
select
ash.SQL_ID ,
sum(decode(ash.session_state,'ON CPU',1,0)) "CPU",
sum(decode(ash.session_state,'WAITING',1,0)) -
sum(decode(ash.session_state,'WAITING', decode(en.wait_class, 'User I/O',1,0),0)) "WAIT" ,
sum(decode(ash.session_state,'WAITING', decode(en.wait_class, 'User I/O',1,0),0)) "IO" ,
sum(decode(ash.session_state,'ON CPU',1,1)) "TOTAL"
from v$active_session_history ash,
v$event_name en
where SQL_ID is not NULL and en.event#=ash.event#
group by sql_id
order by sum(decode(session_state,'ON CPU',1,1)) desc
select
ash.SQL_ID ,
sum(decode(ash.session_state,'ON CPU',1,0)) "CPU",
sum(decode(ash.session_state,'WAITING',1,0)) -
sum(decode(ash.session_state,'WAITING', decode(en.wait_class, 'User I/O',1,0),0)) "WAIT" ,
sum(decode(ash.session_state,'WAITING', decode(en.wait_class, 'User I/O',1,0),0)) "IO" ,
sum(decode(ash.session_state,'ON CPU',1,1)) "TOTAL"
from v$active_session_history ash,
v$event_name en
where SQL_ID is not NULL and en.event#=ash.event#
group by sql_id
order by sum(decode(session_state,'ON CPU',1,1)) desc
#.25
Copyright 2006 Kyle Hailey
Top SQL from ASH Results
SQL_ID CPU WAITING IO TOTAL
------------- ---------- ---------- ---------- ----------
4c1xvq9ufwcjc 23386 0 0 23386
6wjw6rz5uvbp3 99 0 23 122
968dm8hr9qd03 97 0 22 119
938jp5gasmrah 90 0 25 115
cv8xnv81kf582 42 0 9 51
6p9bzu19v965k 21 0 0 21
5zu8pxnun66bu 15 0 0 15
db2jr13nup72v 9 0 0 9
7ks5gnj38hghv 8 0 0 8
SQL_ID CPU WAITING IO TOTAL
------------- ---------- ---------- ---------- ----------
4c1xvq9ufwcjc 23386 0 0 23386
6wjw6rz5uvbp3 99 0 23 122
968dm8hr9qd03 97 0 22 119
938jp5gasmrah 90 0 25 115
cv8xnv81kf582 42 0 9 51
6p9bzu19v965k 21 0 0 21
5zu8pxnun66bu 15 0 0 15
db2jr13nup72v 9 0 0 9
7ks5gnj38hghv 8 0 0 8
#.26
Copyright 2006 Kyle Hailey
Top Session
select
ash.session_id,
ash.session_serial#,
ash.user_id,
ash.program,
sum(decode(ash.session_state,'ON CPU',1,0)) "CPU",
sum(decode(ash.session_state,'WAITING',1,0)) -
sum(decode(ash.session_state,'WAITING',
decode(en.wait_class,'User I/O',1, 0 ), 0)) "WAITING" ,
sum(decode(ash.session_state,'WAITING',
decode(en.wait_class,'User I/O',1, 0 ), 0)) "IO" ,
sum(decode(session_state,'ON CPU',1,1)) "TOTAL"
from v$active_session_history ash,
v$event_name en
where en.event# = ash.event#
group by session_id,user_id,session_serial#,program
order by sum(decode(session_state,'ON CPU',1,1))
select
ash.session_id,
ash.session_serial#,
ash.user_id,
ash.program,
sum(decode(ash.session_state,'ON CPU',1,0)) "CPU",
sum(decode(ash.session_state,'WAITING',1,0)) -
sum(decode(ash.session_state,'WAITING',
decode(en.wait_class,'User I/O',1, 0 ), 0)) "WAITING" ,
sum(decode(ash.session_state,'WAITING',
decode(en.wait_class,'User I/O',1, 0 ), 0)) "IO" ,
sum(decode(session_state,'ON CPU',1,1)) "TOTAL"
from v$active_session_history ash,
v$event_name en
where en.event# = ash.event#
group by session_id,user_id,session_serial#,program
order by sum(decode(session_state,'ON CPU',1,1))
select
ash.session_id,
ash.session_serial#,
ash.user_id,
ash.program,
sum(decode(ash.session_state,'ON CPU',1,0)) "CPU",
sum(decode(ash.session_state,'WAITING',1,0)) -
sum(decode(ash.session_state,'WAITING',
decode(en.wait_class,'User I/O',1, 0 ), 0)) "WAITING" ,
sum(decode(ash.session_state,'WAITING',
decode(en.wait_class,'User I/O',1, 0 ), 0)) "IO" ,
sum(decode(session_state,'ON CPU',1,1)) "TOTAL"
from v$active_session_history ash,
v$event_name en
where en.event# = ash.event#
group by session_id,user_id,session_serial#,program
order by sum(decode(session_state,'ON CPU',1,1))
#.27
Copyright 2006 Kyle Hailey
Top Session Results
SESSION_ID SERIAL# USER_ID PROGRAM CPU WAITING IO
---------- ------- ---------- ------------------------- ------- ---------- ----------
247 61970 1 sqlplus 11698 0 0
277 1 0 oracle@labsfrh903 (LGWR) 14 21 0
276 1 0 oracle@labsfrh903 (CKPT) 19 10 0
278 1 0 oracle@labsfrh903 (DBW0) 29 0 0
280 1 0 oracle@labsfrh903 (PMON) 19 0 0
254 22617 5 Executor.exe 13 0 3
255 12877 5 Executor.exe 11 0 5
257 33729 5 Executor.exe 15 0 1
255 13417 5 Executor.exe 14 0 2
SESSION_ID SERIAL# USER_ID PROGRAM CPU WAITING IO
---------- ------- ---------- ------------------------- ------- ---------- ----------
247 61970 1 sqlplus 11698 0 0
277 1 0 oracle@labsfrh903 (LGWR) 14 21 0
276 1 0 oracle@labsfrh903 (CKPT) 19 10 0
278 1 0 oracle@labsfrh903 (DBW0) 29 0 0
280 1 0 oracle@labsfrh903 (PMON) 19 0 0
254 22617 5 Executor.exe 13 0 3
255 12877 5 Executor.exe 11 0 5
257 33729 5 Executor.exe 15 0 1
255 13417 5 Executor.exe 14 0 2
#.28
Copyright 2006 Kyle Hailey
Top Session w/ Username
select
decode(nvl(to_char(s.sid),-1),-1,'DISCONNECTED','CONNECTED')
"STATUS",
topsession.session_id "SESSION_ID",
u.name "NAME",
topsession.program "PROGRAM",
max(topsession.CPU) "CPU",
max(topsession.WAITING) "WAITING",
max(topsession.IO) "IO",
max(topsession.TOTAL) "TOTAL"
from ( {previous query} ) topsession,
v$session s,
user$ u
where
u.user# =topsession.user_id and
/* outer join to v$session because the session might be disconnected */
topsession.session_id = s.sid (+) and
topsession.session_serial# = s.serial# (+)
group by topsession.session_id, topsession.session_serial#, topsession.user_id,
topsession.program, s.username,s.sid,s.paddr,u.name
order by max(topsession.TOTAL) desc
select
decode(nvl(to_char(s.sid),-1),-1,'DISCONNECTED','CONNECTED')
"STATUS",
topsession.session_id "SESSION_ID",
u.name "NAME",
topsession.program "PROGRAM",
max(topsession.CPU) "CPU",
max(topsession.WAITING) "WAITING",
max(topsession.IO) "IO",
max(topsession.TOTAL) "TOTAL"
from ( {previous query} ) topsession,
v$session s,
user$ u
where
u.user# =topsession.user_id and
/* outer join to v$session because the session might be disconnected */
topsession.session_id = s.sid (+) and
topsession.session_serial# = s.serial# (+)
group by topsession.session_id, topsession.session_serial#, topsession.user_id,
topsession.program, s.username,s.sid,s.paddr,u.name
order by max(topsession.TOTAL) desc
#.29
Copyright 2006 Kyle Hailey
Top Session
Finding a Rogue User
STATUS SESSION_ID NAME PROGRAM CPU WAITING IO
--------------- ---------- ---------- ------------------------- ----- ---------- ----
CONNECTED 247 CPU_Monger ChMgr304.exe 11704 0 0
CONNECTED 277 SYS oracle@labsfrh903 (LGWR) 14 19 0
CONNECTED 278 SYS oracle@labsfrh903 (DBW0) 29 0 0
CONNECTED 276 SYS oracle@labsfrh903 (CKPT) 18 9 0
CONNECTED 280 SYS oracle@labsfrh903 (PMON) 20 0 0
DISCONNECTED 255 SYSTEM Executor.exe 11 4 5
DISCONNECTED 257 SYSTEM Executor.exe 13 0 3
DISCONNECTED 255 SYSTEM Executor.exe 14 0 2
DISCONNECTED 257 SYSTEM Executor.exe 13 0 3
STATUS SESSION_ID NAME PROGRAM CPU WAITING IO
--------------- ---------- ---------- ------------------------- ----- ---------- ----
CONNECTED 247 CPU_Monger ChMgr304.exe 11704 0 0
CONNECTED 277 SYS oracle@labsfrh903 (LGWR) 14 19 0
CONNECTED 278 SYS oracle@labsfrh903 (DBW0) 29 0 0
CONNECTED 276 SYS oracle@labsfrh903 (CKPT) 18 9 0
CONNECTED 280 SYS oracle@labsfrh903 (PMON) 20 0 0
DISCONNECTED 255 SYSTEM Executor.exe 11 4 5
DISCONNECTED 257 SYSTEM Executor.exe 13 0 3
DISCONNECTED 255 SYSTEM Executor.exe 14 0 2
DISCONNECTED 257 SYSTEM Executor.exe 13 0 3
#.30
Copyright 2006 Kyle Hailey
Act.sql : DB Detailed AAS
@act
Analysis Begin Time : 2007-07-24 11:04:48
Analysis End Time : 2007-07-24 11:19:45
Start time, mins ago: 15
Request Duration : 15
Collections : 528
Data Values : 3327
Elapsed Time: 15 mins
WAIT_EVENT CNT % Active Ave_Act_Sess
-------------------------------------- ---------- ------------
latch free 10 .3 .02
log buffer space 13 .39 .02
buffer busy waits 14 .42 .03
db file scattered read 15 .45 .03
library cache pin 78 2.34 .15
log file sync 213 6.4 .4
ON CPU 726 21.82 1.38
enqueue 855 25.7 1.62
db file sequential read 1399 42.05 2.65
------------
sum 6.3
@act
Analysis Begin Time : 2007-07-24 11:04:48
Analysis End Time : 2007-07-24 11:19:45
Start time, mins ago: 15
Request Duration : 15
Collections : 528
Data Values : 3327
Elapsed Time: 15 mins
WAIT_EVENT CNT % Active Ave_Act_Sess
-------------------------------------- ---------- ------------
latch free 10 .3 .02
log buffer space 13 .39 .02
buffer busy waits 14 .42 .03
db file scattered read 15 .45 .03
library cache pin 78 2.34 .15
log file sync 213 6.4 .4
ON CPU 726 21.82 1.38
enqueue 855 25.7 1.62
db file sequential read 1399 42.05 2.65
------------
sum 6.3
#.31
Copyright 2006 Kyle Hailey
Aveact.sql : AAS over time
@aveact
TM NPTS AVEACT GRAPH CPU WAITS
---------------- ------ ------- ---------------------- ---- -----
06-AUG 13:00:00 270 .33 +- 2 29 59
06-AUG 14:00:00 1040 2.24 ++--------2--- 341 1984
06-AUG 15:00:00 623 6.67 ++++------2---------- 438 3718
06-AUG 16:00:00 1088 2.59 ++--------2---- 335 2486
06-AUG 17:00:00 1104 1.26 ++----- 2 349 1043
06-AUG 18:00:00 1093 1.38 +++---- 2 663 842
06-AUG 19:00:00 1012 1.74 ++------- 2 373 1388
06-AUG 20:00:00 1131 .99 +---- 2 304 820
06-AUG 21:00:00 1111 1.22 ++----- 2 344 1012
06-AUG 22:00:00 1010 1.66 ++------ 2 414 1259
06-AUG 23:00:00 1120 1.08 +---- 2 298 913
07-AUG 00:00:00 1024 .83 +--- 2 273 576
07-AUG 01:00:00 1006 1.74 ++------- 2 319 1428
07-AUG 02:00:00 1090 2.47 ++--------2---- 347 2345
07-AUG 03:00:00 687 6.59 +++-------2---------- 382 4142
07-AUG 04:00:00 1004 1.95 ++++++--- 2 1299 659
07-AUG 05:00:00 1104 3.08 +++++-----2------ 1170 2226
07-AUG 06:00:00 1122 1.91 +++++++-- 2 1582 558
07-AUG 07:00:00 1115 1.06 +++--- 2 559 618
07-AUG 08:00:00 1140 .81 ++-- 2 403 519
07-AUG 09:00:00 1128 .88 ++--- 2 386 601
@aveact
TM NPTS AVEACT GRAPH CPU WAITS
---------------- ------ ------- ---------------------- ---- -----
06-AUG 13:00:00 270 .33 +- 2 29 59
06-AUG 14:00:00 1040 2.24 ++--------2--- 341 1984
06-AUG 15:00:00 623 6.67 ++++------2---------- 438 3718
06-AUG 16:00:00 1088 2.59 ++--------2---- 335 2486
06-AUG 17:00:00 1104 1.26 ++----- 2 349 1043
06-AUG 18:00:00 1093 1.38 +++---- 2 663 842
06-AUG 19:00:00 1012 1.74 ++------- 2 373 1388
06-AUG 20:00:00 1131 .99 +---- 2 304 820
06-AUG 21:00:00 1111 1.22 ++----- 2 344 1012
06-AUG 22:00:00 1010 1.66 ++------ 2 414 1259
06-AUG 23:00:00 1120 1.08 +---- 2 298 913
07-AUG 00:00:00 1024 .83 +--- 2 273 576
07-AUG 01:00:00 1006 1.74 ++------- 2 319 1428
07-AUG 02:00:00 1090 2.47 ++--------2---- 347 2345
07-AUG 03:00:00 687 6.59 +++-------2---------- 382 4142
07-AUG 04:00:00 1004 1.95 ++++++--- 2 1299 659
07-AUG 05:00:00 1104 3.08 +++++-----2------ 1170 2226
07-AUG 06:00:00 1122 1.91 +++++++-- 2 1582 558
07-AUG 07:00:00 1115 1.06 +++--- 2 559 618
07-AUG 08:00:00 1140 .81 ++-- 2 403 519
07-AUG 09:00:00 1128 .88 ++--- 2 386 601
#.32
Copyright 2006 Kyle Hailey
Aveact.sql
#.33
Copyright 2006 Kyle Hailey
““-” = WAIT-” = WAIT
““+” = CPU+” = CPU
which waits ? -> aveactn.sqlwhich waits ? -> aveactn.sql
#.34
Aveactn.sql
Copyright 2006 Kyle Hailey
#.35
Copyright 2006 Kyle Hailey
Many Ways to Attack Problems
Confusing
 How to Attack the problem?
 Top SQL?
 Top wait for that SQL?
 Top Waiting Session ?
 Top Waits for that Session
 Top Waits for Database?
 Top Session waiting for that wait
 Top SQL for that wait
Solution - Graphics
#.36
Copyright 2006 Kyle Hailey
Mining Data is Non Trivial
 Many Dimensions to consider
 Constantly Varying time frames
 Luckily 10g automates all of this functionality.
 collects all of the data
 analyses all the wait events
 reports on bottlenecks
 supplies solutions
 Graphics add tremendous ease and power
Session 1
Session 2
Session 3
Session 4
TIME
Graphical ASH
#.38
Copyright 2006 Kyle Hailey
Graph of User States
#.39
Copyright 2006 Kyle Hailey
One Second Graph
#.40
Copyright 2006 Kyle Hailey
15 Second Averages
#.41
Copyright 2006 Kyle Hailey
Maximum CPU Line
#.42
Copyright 2006 Kyle Hailey
Idle Users
#.43
Copyright 2006 Kyle Hailey
OEM Perf Page
#.44
Copyright 2006 Kyle Hailey
OEM Perf Page
#.45
Copyright 2006 Kyle Hailey
ASH
vs
Statistics
 Statistics
 are more expensive
 have lag time
 lack clear identification of culprits
#.46
Copyright 2006 Kyle Hailey
Statistic Lag Time
CountersCounters
SamplesSamples
Slight LagsSlight Lags
#.47
Copyright 2006 Kyle Hailey
CPU Lag Problem
 ASH is the only way to see CPU usage
realtime
 V$sysstat reports CPU but
 is only updated at the end of the call.
 Long calls look deceiving like no CPU is being
used
#.48
Copyright 2006 Kyle Hailey
CPU in ASH vs Stats
#.49
Copyright 2006 Kyle Hailey
ASH Sampling Cheap
Three Methods
1.With PL/SQL it’s less that 1 % CPU with 10
average active sessions
2.DMA - direct memory attach to SGA Using C
code 200x Cheaper
3.ASH in 10g should be even cheaper than
DMA because it’s done in the kernel
#.50
Copyright 2006 Kyle Hailey
ASH – In Memory
 Collects active session data only
 History v$session_wait + v$session + extras
 Circular Buffer - 1M to 128M (~2% of SGA)
 Flushed every hour to disk or when buffer 2/3
full (it protects itself so you can relax)
#.51
Copyright 2006 Kyle Hailey
ASH Sizing …
 Avg row around 150bytes
 3600 secs in an hour
 ~ ½ Meg per Active Session per hour
 That’s generally over an hour of ASH
#.52
Copyright 2006 Kyle Hailey
How ASH works
V$session_wait
+ v$session +
extras
MMON/
MMNL
v$active_session_history
wrh$_active_session_history
Only writes out 1 in 10 rows
via direct path inserts
#.53
Copyright 2006 Kyle Hailey
Select reads
backwards
-No latching
-No read consistency
-Index on time Insert point
ASH buffer
Insert one direction
- Touch up wait times
#.54
Copyright 2006 Kyle Hailey
Family of ASH Tables
v$session_wait
v$active_session_history
wrh$active_session_history
V$session_wait_history
DBA_HIST_ACTIVE_SESS_HISTORY
#.55
Copyright 2006 Kyle Hailey
ASH Tables
v$session_wait
SID
SEQ#
EVENT
P1TEXT
P1
P1RAW
P2TEXT
P2
P2RAW
P3TEXT
P3
P3RAW
WAIT_CLASS_ID
WAIT_CLASS#
WAIT_CLASS
WAIT_TIME
SECONDS_IN_WAIT
STATE
v$session_wait_history
SID
SEQ#
EVENT#
EVENT
P1TEXT
P1
P2TEXT
P2
P3TEXT
P3
WAIT_TIME
v$event_name
EVENT_ID
EVENT#
EVENT_ID
NAME
PARAMETER1
PARAMETER2
PARAMETER3
WAIT_CLASS_ID
WAIT_CLASS#
WAIT_CLASS
v$active_session_history
SAMPLE_ID
SAMPLE_TIME
SESSION_ID
SESSION_SERIAL#
USER_ID
SQL_ID
SQL_CHILD_NUMBER
SQL_PLAN_HASH_VALUE
SQL_OPCODE
SERVICE_HASH
SESSION_TYPE
SESSION_STATE
QC_SESSION_ID
QC_INSTANCE_ID
SEQ#
EVENT#
P1
P2
P3
WAIT_TIME
TIME_WAITED
CURRENT_OBJ#
CURRENT_FILE#
CURRENT_BLOCK#
PROGRAM
MODULE
ACTION
CLIENT_ID
current 10 samples hour
DBA_HIST_ACTIVE_SESS_HISTORY
wrh$active_session_history
SNAP_D
DBID
INSTANCE_NUMBER
SAMPLE_ID
SAMPLE_TIME
SESSION_ID
SESSION_SERIAL#
USER_ID
SQL_ID
SQL_CHILD_NUMBER
SQL_PLAN_HASH_VALUE
SQL_OPCODE
SERVICE_HASH
SESSION_TYPE
SESSION_STATE
QC_SESSION_ID
QC_INSTANCE_ID
SEQ#
EVENT_ID
P1
P2
P3
WAIT_TIME
TIME_WAITED
CURRENT_OBJ#
CURRENT_FILE#
CURRENT_BLOCK#
PROGRAM
MODULE
ACTION
CLIENT_ID
7 days (disk)
1 in 10
#.56
Copyright 2006 Kyle Hailey
Wait Time vs Time Waited
 SESSION_STATE
 Waiting, on CPU
 Based on WAIT_TIME
 WAIT_TIME (v$session, v$session_wait, v$ash)
 0 => waiting
 >0 => CPU (value is time of last wait)
 TIME_WAITED
 Actual time waited for event
 0 until wait finishes
 Fix up values (no one else can do this)
#.57
Copyright 2006 Kyle Hailey
Oradebug
 Dump to trace file
SQL> oradebug dump ash 5
SQL> Alter session set events ‘immediate
tracename ashdump level 5’;
level 5 = # of minutes
loader file rdbms/demo/ashldr.ctl
SQL> oradebug dump ashdump 5
SQL> Alter session set events ‘immediate
tracename ashdump level 5’;
#.58
Copyright 2006 Kyle Hailey
INIT.ORA
statistics_level = Typical (default)
PARAMETER SESSION_VALUE INSTANCE_VAL
----------------------- ---------- ------------
_ash_sampling_interval 1000 1000
milliseconds
_ash_size 1048618 1048618
ASH buffer size
_ash_enable TRUE TRUE
Turn on/off ASH sampling, flushing and the V$ views on ASH
_ash_disk_write_enable TRUE TRUE
Flush to disk
_ash_disk_filter_ratio 10 10
write 1 in 10 points
_ash_sample_all FALSE FALSE
Sample including idle waits
#.59
10.2 ASH Extras
 BLOCKING_SESSION
 BLOCKING_SESSION_STATUS
 BLOCKING_SESSION_SERIAL#
 P1TEXT
 P2TEXT
 P3TEXT
 WAIT_CLASS
 WAIT_CLASS_ID
 XID
 FORCE_MATCHING_SIGNATURE
5901/30/15
#.60
Copyright 2006 Kyle Hailey
10.2 Extras
 10gR2 add fields to ASH
 Blocking Session Id, serial# and state ***
 XID, transaction ID
 RAC event Fixup
 Plan Hash Fix up
 10gR1 - during parsing no plan, good way to find parsing
problems
 10gR2 – get plan hash fixup – good but lose some ability to find
parsing problems
 Wait Class, needed this for grouping
 Force_matching_signature – sql profile id
#.61
10.2.0.3 ASH Extras
PLSQL_ENTRY_OBJECT_ID
PLSQL_ENTRY_SUBPROGRAM_ID
PLSQL_OBJECT_ID
PLSQL_SUBPROGRAM_ID
6101/30/15
ALL_PROCEDURESALL_PROCEDURES
where object_id = plsql_object_idwhere object_id = plsql_object_id
and subprogram_id = plsql_subprogram_idand subprogram_id = plsql_subprogram_id
#.62
6201/30/15
PLSQL Tracking
Package/Procedure/SQL tracking 10.2.0.3
calling_code SQL_ID COUNT(*)
----------------------------------------------- ----------
ORDERENTRY.NEWORDER 0uuqgjq7k12nf 258
ORDERENTRY.NEWCUSTOMER 0bzhqhhj9mpaa 262
ORDERENTRY.BROWSEANDUPDATEORDERS 41zu158rqf4kf 301
ORDERENTRY.NEWORDER 0yas01u2p9ch4 569
PARSE_SAME 3vjxpmhhzngu4 874
ORDERENTRY.BROWSEANDUPDATEORDERS 05s4vdwsf5802 1669
select
object_name package||.|| procedure_name, sql_id, count(*)
from v$active_session_history ash,
all_procedures procs
where
ash.PLSQL_ENTRY_OBJECT_ID = procs.object_id
and ash.PLSQL_ENTRY_SUBPROGRAM_ID = procs.SUBPROGRAM_ID
#.63
Copyright 2006 Kyle Hailey
11g ASH extras
SQL ElapsedSQL Elapsed
SQL_EXEC_ID
SQL_EXEC_START
IN_CONNECTION_MGMT
IN_PARSE
IN_HARD_PARSE
IN_SQL_EXECUTION
IN_PLSQL_EXECUTION
IN_PLSQL_RPC
IN_PLSQL_COMPILATION
IN_JAVA_EXECUTION
IN_BIND
IN_CURSOR_CLOSE
SQL_PLAN_LINE_ID
SQL_PLAN_OPERATION
SQL_PLAN_OPTIONS
CURRENT_ROW#
EVENT#
QC_SESSION_SERIAL#
CONSUMER_GROUP_ID
FLAGS
ETCETC
CPU Analysis – non TimedCPU Analysis – non Timed
SQL Row SourceSQL Row Source
REMOTE_INSTANCE#
RAC – remote transfersRAC – remote transfers
TOP_LEVEL_SQL_ID
TOP_LEVEL_SQL_OPCODE
Recursive SQLRecursive SQL
#.64
Copyright 2006 Kyle Hailey
11g ASH extras
Run-time SQL row source information
 Identifies current row source within plan
SQL execution ID
 Is this same execution as last sample?
 can see how long sql has been running
Operation bit vector
 Capture non-timed operations
 Examples: fetch, binding, close
Remote instance id for Cache transfers
 Which instance sourced requested block?
#.65
Copyright 2006 Kyle Hailey
How Many Active Sessions?
 How much data does ASH Collect ?
 1 CPU means max 1 Avg Active Session unless
there is a bottleneck
Big site examples:
 Oracle 4 way RAC internal apps
 10,000 connected, 200 active
 One Site
 3000 connected, 30 Active
 Site
 12,000 connected, 100 active
#.66
Copyright 2006 Kyle Hailey
Simulating ASH
 ASH is new in 10g
 ASH data exist since V7
 Need Diagnostic Pack License 
 Collect it yourself 
 SASH – Simulated ASH
http://perfvision.com/sash.php
 Graphical Monitor
http://perfvision.com/ashmon.php
Consumes < 1% CPU for 10 active sessions (a lot)
#.67
Copyright 2006 Kyle Hailey
Sampling
 Sampling is the future
 Took clean vision to create
 Bit of a leap of faith
 Less Accurate but more powerful than past
 Inaccuracies unimportant for the most part
 Feasible since version 7
 You can implement it yourself
 Graphics are the only way to full harness the
power
#.68
Copyright 2006 Kyle Hailey
Summary
 To solve hard problems you need Sampling
 If you have 10g and a license you can use
 V$active_session_history
 OEM 10g (can access some 9 sampling)
 ?/rdbms/admim/ashrpt.sql
 If you are on 7,8,9 or 10g without the license
 Need custom sampling
 SASH – Simulated ASH http://perfvision.com/ash.php
 ASHMON – graphical http://perfvision.com/ashmon.php
#.69
Copyright 2006 Kyle Hailey
ASH Summary
Faster, Cheaper, instant (no lag) …
but most importantly
Rich & Multidimensional
 Overview of system load
 Drilldowns into problems
 Sql
 Session
 Wait event
 Details information on problem resolution
 OEM simplifies mining of ASH data

More Related Content

What's hot

Profiling the logwriter and database writer
Profiling the logwriter and database writerProfiling the logwriter and database writer
Profiling the logwriter and database writerKyle Hailey
 
Average Active Sessions RMOUG2007
Average Active Sessions RMOUG2007Average Active Sessions RMOUG2007
Average Active Sessions RMOUG2007John Beresniewicz
 
Christo kutrovsky oracle, memory & linux
Christo kutrovsky   oracle, memory & linuxChristo kutrovsky   oracle, memory & linux
Christo kutrovsky oracle, memory & linuxKyle Hailey
 
Hotsos 2011: Mining the AWR repository for Capacity Planning, Visualization, ...
Hotsos 2011: Mining the AWR repository for Capacity Planning, Visualization, ...Hotsos 2011: Mining the AWR repository for Capacity Planning, Visualization, ...
Hotsos 2011: Mining the AWR repository for Capacity Planning, Visualization, ...Kristofferson A
 
AWR DB performance Data Mining - Collaborate 2015
AWR DB performance Data Mining - Collaborate 2015AWR DB performance Data Mining - Collaborate 2015
AWR DB performance Data Mining - Collaborate 2015Yury Velikanov
 
VirtaThon 2011 - Mining the AWR
VirtaThon 2011 - Mining the AWRVirtaThon 2011 - Mining the AWR
VirtaThon 2011 - Mining the AWRKristofferson A
 
Performance Tuning With Oracle ASH and AWR. Part 1 How And What
Performance Tuning With Oracle ASH and AWR. Part 1 How And WhatPerformance Tuning With Oracle ASH and AWR. Part 1 How And What
Performance Tuning With Oracle ASH and AWR. Part 1 How And Whatudaymoogala
 
Oracle Database Performance Tuning Concept
Oracle Database Performance Tuning ConceptOracle Database Performance Tuning Concept
Oracle Database Performance Tuning ConceptChien Chung Shen
 
Think Exa!
Think Exa!Think Exa!
Think Exa!Enkitec
 
Oracle AWR Data mining
Oracle AWR Data miningOracle AWR Data mining
Oracle AWR Data miningYury Velikanov
 
Tanel Poder - Troubleshooting Complex Oracle Performance Issues - Part 2
Tanel Poder - Troubleshooting Complex Oracle Performance Issues - Part 2Tanel Poder - Troubleshooting Complex Oracle Performance Issues - Part 2
Tanel Poder - Troubleshooting Complex Oracle Performance Issues - Part 2Tanel Poder
 
Troubleshooting Complex Oracle Performance Problems with Tanel Poder
Troubleshooting Complex Oracle Performance Problems with Tanel PoderTroubleshooting Complex Oracle Performance Problems with Tanel Poder
Troubleshooting Complex Oracle Performance Problems with Tanel PoderTanel Poder
 
Whitepaper: Mining the AWR repository for Capacity Planning and Visualization
Whitepaper: Mining the AWR repository for Capacity Planning and VisualizationWhitepaper: Mining the AWR repository for Capacity Planning and Visualization
Whitepaper: Mining the AWR repository for Capacity Planning and VisualizationKristofferson A
 
Troubleshooting Complex Performance issues - Oracle SEG$ contention
Troubleshooting Complex Performance issues - Oracle SEG$ contentionTroubleshooting Complex Performance issues - Oracle SEG$ contention
Troubleshooting Complex Performance issues - Oracle SEG$ contentionTanel Poder
 
Oracle sql high performance tuning
Oracle sql high performance tuningOracle sql high performance tuning
Oracle sql high performance tuningGuy Harrison
 
Whitepaper: Where did my CPU go?
Whitepaper: Where did my CPU go?Whitepaper: Where did my CPU go?
Whitepaper: Where did my CPU go?Kristofferson A
 
Mark Farnam : Minimizing the Concurrency Footprint of Transactions
Mark Farnam  : Minimizing the Concurrency Footprint of TransactionsMark Farnam  : Minimizing the Concurrency Footprint of Transactions
Mark Farnam : Minimizing the Concurrency Footprint of TransactionsKyle Hailey
 

What's hot (20)

Profiling the logwriter and database writer
Profiling the logwriter and database writerProfiling the logwriter and database writer
Profiling the logwriter and database writer
 
Average Active Sessions RMOUG2007
Average Active Sessions RMOUG2007Average Active Sessions RMOUG2007
Average Active Sessions RMOUG2007
 
Christo kutrovsky oracle, memory & linux
Christo kutrovsky   oracle, memory & linuxChristo kutrovsky   oracle, memory & linux
Christo kutrovsky oracle, memory & linux
 
Hotsos 2011: Mining the AWR repository for Capacity Planning, Visualization, ...
Hotsos 2011: Mining the AWR repository for Capacity Planning, Visualization, ...Hotsos 2011: Mining the AWR repository for Capacity Planning, Visualization, ...
Hotsos 2011: Mining the AWR repository for Capacity Planning, Visualization, ...
 
Using Statspack and AWR for Memory Monitoring and Tuning
Using Statspack and AWR for Memory Monitoring and TuningUsing Statspack and AWR for Memory Monitoring and Tuning
Using Statspack and AWR for Memory Monitoring and Tuning
 
AWR DB performance Data Mining - Collaborate 2015
AWR DB performance Data Mining - Collaborate 2015AWR DB performance Data Mining - Collaborate 2015
AWR DB performance Data Mining - Collaborate 2015
 
Using AWR/Statspack for Wait Analysis
Using AWR/Statspack for Wait AnalysisUsing AWR/Statspack for Wait Analysis
Using AWR/Statspack for Wait Analysis
 
VirtaThon 2011 - Mining the AWR
VirtaThon 2011 - Mining the AWRVirtaThon 2011 - Mining the AWR
VirtaThon 2011 - Mining the AWR
 
Performance Tuning With Oracle ASH and AWR. Part 1 How And What
Performance Tuning With Oracle ASH and AWR. Part 1 How And WhatPerformance Tuning With Oracle ASH and AWR. Part 1 How And What
Performance Tuning With Oracle ASH and AWR. Part 1 How And What
 
Oracle Database Performance Tuning Concept
Oracle Database Performance Tuning ConceptOracle Database Performance Tuning Concept
Oracle Database Performance Tuning Concept
 
AWR reports-Measuring CPU
AWR reports-Measuring CPUAWR reports-Measuring CPU
AWR reports-Measuring CPU
 
Think Exa!
Think Exa!Think Exa!
Think Exa!
 
Oracle AWR Data mining
Oracle AWR Data miningOracle AWR Data mining
Oracle AWR Data mining
 
Tanel Poder - Troubleshooting Complex Oracle Performance Issues - Part 2
Tanel Poder - Troubleshooting Complex Oracle Performance Issues - Part 2Tanel Poder - Troubleshooting Complex Oracle Performance Issues - Part 2
Tanel Poder - Troubleshooting Complex Oracle Performance Issues - Part 2
 
Troubleshooting Complex Oracle Performance Problems with Tanel Poder
Troubleshooting Complex Oracle Performance Problems with Tanel PoderTroubleshooting Complex Oracle Performance Problems with Tanel Poder
Troubleshooting Complex Oracle Performance Problems with Tanel Poder
 
Whitepaper: Mining the AWR repository for Capacity Planning and Visualization
Whitepaper: Mining the AWR repository for Capacity Planning and VisualizationWhitepaper: Mining the AWR repository for Capacity Planning and Visualization
Whitepaper: Mining the AWR repository for Capacity Planning and Visualization
 
Troubleshooting Complex Performance issues - Oracle SEG$ contention
Troubleshooting Complex Performance issues - Oracle SEG$ contentionTroubleshooting Complex Performance issues - Oracle SEG$ contention
Troubleshooting Complex Performance issues - Oracle SEG$ contention
 
Oracle sql high performance tuning
Oracle sql high performance tuningOracle sql high performance tuning
Oracle sql high performance tuning
 
Whitepaper: Where did my CPU go?
Whitepaper: Where did my CPU go?Whitepaper: Where did my CPU go?
Whitepaper: Where did my CPU go?
 
Mark Farnam : Minimizing the Concurrency Footprint of Transactions
Mark Farnam  : Minimizing the Concurrency Footprint of TransactionsMark Farnam  : Minimizing the Concurrency Footprint of Transactions
Mark Farnam : Minimizing the Concurrency Footprint of Transactions
 

Viewers also liked

How to find and fix your Oracle application performance problem
How to find and fix your Oracle application performance problemHow to find and fix your Oracle application performance problem
How to find and fix your Oracle application performance problemCary Millsap
 
Oaktable World 2014 Toon Koppelaars: database constraints polite excuse
Oaktable World 2014 Toon Koppelaars: database constraints polite excuseOaktable World 2014 Toon Koppelaars: database constraints polite excuse
Oaktable World 2014 Toon Koppelaars: database constraints polite excuseKyle Hailey
 
History of database monitoring
History of database monitoringHistory of database monitoring
History of database monitoringKyle Hailey
 
SQL Tuning Methodology, Kscope 2013
SQL Tuning Methodology, Kscope 2013 SQL Tuning Methodology, Kscope 2013
SQL Tuning Methodology, Kscope 2013 Kyle Hailey
 
Average Active Sessions - OaktableWorld 2013
Average Active Sessions - OaktableWorld 2013Average Active Sessions - OaktableWorld 2013
Average Active Sessions - OaktableWorld 2013John Beresniewicz
 
DB Tech Showcase 2016 - E35 - SQLチューニング総合診療所的予防医学
DB Tech Showcase 2016 - E35 - SQLチューニング総合診療所的予防医学DB Tech Showcase 2016 - E35 - SQLチューニング総合診療所的予防医学
DB Tech Showcase 2016 - E35 - SQLチューニング総合診療所的予防医学Hiroshi Sekiguchi
 
Dan Norris: Exadata security
Dan Norris: Exadata securityDan Norris: Exadata security
Dan Norris: Exadata securityKyle Hailey
 
OakTable World Sep14 clonedb
OakTable World Sep14 clonedb OakTable World Sep14 clonedb
OakTable World Sep14 clonedb Connor McDonald
 
Indexes: Structure, Splits and Free Space Management Internals
Indexes: Structure, Splits and Free Space Management InternalsIndexes: Structure, Splits and Free Space Management Internals
Indexes: Structure, Splits and Free Space Management InternalsChristian Antognini
 
OakTable World 2015 - Using XMLType content with the Oracle In-Memory Column...
OakTable World 2015  - Using XMLType content with the Oracle In-Memory Column...OakTable World 2015  - Using XMLType content with the Oracle In-Memory Column...
OakTable World 2015 - Using XMLType content with the Oracle In-Memory Column...Marco Gralike
 
Oaktable World 2014 Kevin Closson: SLOB – For More Than I/O!
Oaktable World 2014 Kevin Closson:  SLOB – For More Than I/O!Oaktable World 2014 Kevin Closson:  SLOB – For More Than I/O!
Oaktable World 2014 Kevin Closson: SLOB – For More Than I/O!Kyle Hailey
 
OOUG - Oracle Performance Tuning with AAS
OOUG - Oracle Performance Tuning with AASOOUG - Oracle Performance Tuning with AAS
OOUG - Oracle Performance Tuning with AASKyle Hailey
 
ARC202 Architecting for High Availability - AWS re: Invent 2012
ARC202 Architecting for High Availability - AWS re: Invent 2012ARC202 Architecting for High Availability - AWS re: Invent 2012
ARC202 Architecting for High Availability - AWS re: Invent 2012Amazon Web Services
 
Oracle Database on ACFS: a perfect marriage?
Oracle Database on ACFS: a perfect marriage?Oracle Database on ACFS: a perfect marriage?
Oracle Database on ACFS: a perfect marriage?Ludovico Caldara
 
Oracle Database Security: Top 10 Things You Could & Should Be Doing Differently
Oracle Database Security: Top 10 Things You Could & Should Be Doing DifferentlyOracle Database Security: Top 10 Things You Could & Should Be Doing Differently
Oracle Database Security: Top 10 Things You Could & Should Be Doing DifferentlyPythian
 
Worst Practices in Data Warehouse Design
Worst Practices in Data Warehouse DesignWorst Practices in Data Warehouse Design
Worst Practices in Data Warehouse DesignKent Graziano
 
Introducing the eDB360 Tool
Introducing the eDB360 ToolIntroducing the eDB360 Tool
Introducing the eDB360 ToolCarlos Sierra
 
DBaaS- Database as a Service in a DBAs World
DBaaS- Database as a Service in a DBAs WorldDBaaS- Database as a Service in a DBAs World
DBaaS- Database as a Service in a DBAs WorldKellyn Pot'Vin-Gorman
 
Getting Started with Managed Database Services on AWS
Getting Started with Managed Database Services on AWSGetting Started with Managed Database Services on AWS
Getting Started with Managed Database Services on AWSAmazon Web Services
 

Viewers also liked (20)

How to find and fix your Oracle application performance problem
How to find and fix your Oracle application performance problemHow to find and fix your Oracle application performance problem
How to find and fix your Oracle application performance problem
 
Oaktable World 2014 Toon Koppelaars: database constraints polite excuse
Oaktable World 2014 Toon Koppelaars: database constraints polite excuseOaktable World 2014 Toon Koppelaars: database constraints polite excuse
Oaktable World 2014 Toon Koppelaars: database constraints polite excuse
 
History of database monitoring
History of database monitoringHistory of database monitoring
History of database monitoring
 
SQL Tuning Methodology, Kscope 2013
SQL Tuning Methodology, Kscope 2013 SQL Tuning Methodology, Kscope 2013
SQL Tuning Methodology, Kscope 2013
 
Average Active Sessions - OaktableWorld 2013
Average Active Sessions - OaktableWorld 2013Average Active Sessions - OaktableWorld 2013
Average Active Sessions - OaktableWorld 2013
 
DB Tech Showcase 2016 - E35 - SQLチューニング総合診療所的予防医学
DB Tech Showcase 2016 - E35 - SQLチューニング総合診療所的予防医学DB Tech Showcase 2016 - E35 - SQLチューニング総合診療所的予防医学
DB Tech Showcase 2016 - E35 - SQLチューニング総合診療所的予防医学
 
Dan Norris: Exadata security
Dan Norris: Exadata securityDan Norris: Exadata security
Dan Norris: Exadata security
 
OakTable World Sep14 clonedb
OakTable World Sep14 clonedb OakTable World Sep14 clonedb
OakTable World Sep14 clonedb
 
Indexes: Structure, Splits and Free Space Management Internals
Indexes: Structure, Splits and Free Space Management InternalsIndexes: Structure, Splits and Free Space Management Internals
Indexes: Structure, Splits and Free Space Management Internals
 
OakTable World 2015 - Using XMLType content with the Oracle In-Memory Column...
OakTable World 2015  - Using XMLType content with the Oracle In-Memory Column...OakTable World 2015  - Using XMLType content with the Oracle In-Memory Column...
OakTable World 2015 - Using XMLType content with the Oracle In-Memory Column...
 
Oaktable World 2014 Kevin Closson: SLOB – For More Than I/O!
Oaktable World 2014 Kevin Closson:  SLOB – For More Than I/O!Oaktable World 2014 Kevin Closson:  SLOB – For More Than I/O!
Oaktable World 2014 Kevin Closson: SLOB – For More Than I/O!
 
OOUG - Oracle Performance Tuning with AAS
OOUG - Oracle Performance Tuning with AASOOUG - Oracle Performance Tuning with AAS
OOUG - Oracle Performance Tuning with AAS
 
ARC202 Architecting for High Availability - AWS re: Invent 2012
ARC202 Architecting for High Availability - AWS re: Invent 2012ARC202 Architecting for High Availability - AWS re: Invent 2012
ARC202 Architecting for High Availability - AWS re: Invent 2012
 
Data control
Data controlData control
Data control
 
Oracle Database on ACFS: a perfect marriage?
Oracle Database on ACFS: a perfect marriage?Oracle Database on ACFS: a perfect marriage?
Oracle Database on ACFS: a perfect marriage?
 
Oracle Database Security: Top 10 Things You Could & Should Be Doing Differently
Oracle Database Security: Top 10 Things You Could & Should Be Doing DifferentlyOracle Database Security: Top 10 Things You Could & Should Be Doing Differently
Oracle Database Security: Top 10 Things You Could & Should Be Doing Differently
 
Worst Practices in Data Warehouse Design
Worst Practices in Data Warehouse DesignWorst Practices in Data Warehouse Design
Worst Practices in Data Warehouse Design
 
Introducing the eDB360 Tool
Introducing the eDB360 ToolIntroducing the eDB360 Tool
Introducing the eDB360 Tool
 
DBaaS- Database as a Service in a DBAs World
DBaaS- Database as a Service in a DBAs WorldDBaaS- Database as a Service in a DBAs World
DBaaS- Database as a Service in a DBAs World
 
Getting Started with Managed Database Services on AWS
Getting Started with Managed Database Services on AWSGetting Started with Managed Database Services on AWS
Getting Started with Managed Database Services on AWS
 

Similar to Intro to ASH

Oracle 10g Performance: chapter 00 sampling
Oracle 10g Performance: chapter 00 samplingOracle 10g Performance: chapter 00 sampling
Oracle 10g Performance: chapter 00 samplingKyle Hailey
 
Hangover - Que pasó ayer? Troubleshooting con vistas ASH & S-ASH
Hangover - Que pasó ayer?   Troubleshooting con vistas ASH & S-ASHHangover - Que pasó ayer?   Troubleshooting con vistas ASH & S-ASH
Hangover - Que pasó ayer? Troubleshooting con vistas ASH & S-ASHRoy Salazar
 
Your tuning arsenal: AWR, ADDM, ASH, Metrics and Advisors
Your tuning arsenal: AWR, ADDM, ASH, Metrics and AdvisorsYour tuning arsenal: AWR, ADDM, ASH, Metrics and Advisors
Your tuning arsenal: AWR, ADDM, ASH, Metrics and AdvisorsJohn Kanagaraj
 
20201106 hk-py con-mysql-shell
20201106 hk-py con-mysql-shell20201106 hk-py con-mysql-shell
20201106 hk-py con-mysql-shellIvan Ma
 
Instrumenting plugins for Performance Schema
Instrumenting plugins for Performance SchemaInstrumenting plugins for Performance Schema
Instrumenting plugins for Performance SchemaMark Leith
 
DOAG 2016 Oracle Logon Security
DOAG 2016 Oracle Logon SecurityDOAG 2016 Oracle Logon Security
DOAG 2016 Oracle Logon SecurityLoopback.ORG
 
resource governor
resource governorresource governor
resource governorAaron Shilo
 
Top 10 tips for Oracle performance
Top 10 tips for Oracle performanceTop 10 tips for Oracle performance
Top 10 tips for Oracle performanceGuy Harrison
 
MySQL Monitoring Mechanisms
MySQL Monitoring MechanismsMySQL Monitoring Mechanisms
MySQL Monitoring MechanismsMark Leith
 
MySQL Monitoring Mechanisms
MySQL Monitoring MechanismsMySQL Monitoring Mechanisms
MySQL Monitoring MechanismsMark Leith
 
제3회난공불락 오픈소스 인프라세미나 - MySQL Performance
제3회난공불락 오픈소스 인프라세미나 - MySQL Performance제3회난공불락 오픈소스 인프라세미나 - MySQL Performance
제3회난공불락 오픈소스 인프라세미나 - MySQL PerformanceTommy Lee
 
Adventures in Dataguard
Adventures in DataguardAdventures in Dataguard
Adventures in DataguardJason Arneil
 
20160821 coscup-my sql57docstorelab01
20160821 coscup-my sql57docstorelab0120160821 coscup-my sql57docstorelab01
20160821 coscup-my sql57docstorelab01Ivan Ma
 
MySQL NoSQL JSON JS Python "Document Store" demo
MySQL NoSQL JSON JS Python "Document Store" demoMySQL NoSQL JSON JS Python "Document Store" demo
MySQL NoSQL JSON JS Python "Document Store" demoKeith Hollman
 
MySQL 5.7 - What's new, How to upgrade and Document Store
MySQL 5.7 - What's new, How to upgrade and Document StoreMySQL 5.7 - What's new, How to upgrade and Document Store
MySQL 5.7 - What's new, How to upgrade and Document StoreAbel Flórez
 
MySQL 5.7 - What's new and How to upgrade
MySQL 5.7 - What's new and How to upgradeMySQL 5.7 - What's new and How to upgrade
MySQL 5.7 - What's new and How to upgradeAbel Flórez
 

Similar to Intro to ASH (20)

Oracle 10g Performance: chapter 00 sampling
Oracle 10g Performance: chapter 00 samplingOracle 10g Performance: chapter 00 sampling
Oracle 10g Performance: chapter 00 sampling
 
Hangover - Que pasó ayer? Troubleshooting con vistas ASH & S-ASH
Hangover - Que pasó ayer?   Troubleshooting con vistas ASH & S-ASHHangover - Que pasó ayer?   Troubleshooting con vistas ASH & S-ASH
Hangover - Que pasó ayer? Troubleshooting con vistas ASH & S-ASH
 
Your tuning arsenal: AWR, ADDM, ASH, Metrics and Advisors
Your tuning arsenal: AWR, ADDM, ASH, Metrics and AdvisorsYour tuning arsenal: AWR, ADDM, ASH, Metrics and Advisors
Your tuning arsenal: AWR, ADDM, ASH, Metrics and Advisors
 
20201106 hk-py con-mysql-shell
20201106 hk-py con-mysql-shell20201106 hk-py con-mysql-shell
20201106 hk-py con-mysql-shell
 
Ash and awr deep dive hotsos
Ash and awr deep dive hotsosAsh and awr deep dive hotsos
Ash and awr deep dive hotsos
 
Sherlock holmes for dba’s
Sherlock holmes for dba’sSherlock holmes for dba’s
Sherlock holmes for dba’s
 
audit_blog.ppt
audit_blog.pptaudit_blog.ppt
audit_blog.ppt
 
Instrumenting plugins for Performance Schema
Instrumenting plugins for Performance SchemaInstrumenting plugins for Performance Schema
Instrumenting plugins for Performance Schema
 
DOAG 2016 Oracle Logon Security
DOAG 2016 Oracle Logon SecurityDOAG 2016 Oracle Logon Security
DOAG 2016 Oracle Logon Security
 
resource governor
resource governorresource governor
resource governor
 
Top 10 tips for Oracle performance
Top 10 tips for Oracle performanceTop 10 tips for Oracle performance
Top 10 tips for Oracle performance
 
MySQL Monitoring Mechanisms
MySQL Monitoring MechanismsMySQL Monitoring Mechanisms
MySQL Monitoring Mechanisms
 
MySQL Monitoring Mechanisms
MySQL Monitoring MechanismsMySQL Monitoring Mechanisms
MySQL Monitoring Mechanisms
 
제3회난공불락 오픈소스 인프라세미나 - MySQL Performance
제3회난공불락 오픈소스 인프라세미나 - MySQL Performance제3회난공불락 오픈소스 인프라세미나 - MySQL Performance
제3회난공불락 오픈소스 인프라세미나 - MySQL Performance
 
Adventures in Dataguard
Adventures in DataguardAdventures in Dataguard
Adventures in Dataguard
 
20160821 coscup-my sql57docstorelab01
20160821 coscup-my sql57docstorelab0120160821 coscup-my sql57docstorelab01
20160821 coscup-my sql57docstorelab01
 
ASH and AWR on DB12c
ASH and AWR on DB12cASH and AWR on DB12c
ASH and AWR on DB12c
 
MySQL NoSQL JSON JS Python "Document Store" demo
MySQL NoSQL JSON JS Python "Document Store" demoMySQL NoSQL JSON JS Python "Document Store" demo
MySQL NoSQL JSON JS Python "Document Store" demo
 
MySQL 5.7 - What's new, How to upgrade and Document Store
MySQL 5.7 - What's new, How to upgrade and Document StoreMySQL 5.7 - What's new, How to upgrade and Document Store
MySQL 5.7 - What's new, How to upgrade and Document Store
 
MySQL 5.7 - What's new and How to upgrade
MySQL 5.7 - What's new and How to upgradeMySQL 5.7 - What's new and How to upgrade
MySQL 5.7 - What's new and How to upgrade
 

More from Kyle Hailey

Hooks in postgresql by Guillaume Lelarge
Hooks in postgresql by Guillaume LelargeHooks in postgresql by Guillaume Lelarge
Hooks in postgresql by Guillaume LelargeKyle Hailey
 
Performance insights twitch
Performance insights twitchPerformance insights twitch
Performance insights twitchKyle Hailey
 
Successfully convince people with data visualization
Successfully convince people with data visualizationSuccessfully convince people with data visualization
Successfully convince people with data visualizationKyle Hailey
 
Virtual Data : Eliminating the data constraint in Application Development
Virtual Data :  Eliminating the data constraint in Application DevelopmentVirtual Data :  Eliminating the data constraint in Application Development
Virtual Data : Eliminating the data constraint in Application DevelopmentKyle Hailey
 
DBTA Data Summit : Eliminating the data constraint in Application Development
DBTA Data Summit : Eliminating the data constraint in Application DevelopmentDBTA Data Summit : Eliminating the data constraint in Application Development
DBTA Data Summit : Eliminating the data constraint in Application DevelopmentKyle Hailey
 
Accelerate Develoment with VIrtual Data
Accelerate Develoment with VIrtual DataAccelerate Develoment with VIrtual Data
Accelerate Develoment with VIrtual DataKyle Hailey
 
Delphix and Pure Storage partner
Delphix and Pure Storage partnerDelphix and Pure Storage partner
Delphix and Pure Storage partnerKyle Hailey
 
Martin Klier : Volkswagen for Oracle Guys
Martin Klier : Volkswagen for Oracle GuysMartin Klier : Volkswagen for Oracle Guys
Martin Klier : Volkswagen for Oracle GuysKyle Hailey
 
Data as a Service
Data as a Service Data as a Service
Data as a Service Kyle Hailey
 
Data Virtualization: Revolutionizing data cloning
Data Virtualization: Revolutionizing data cloningData Virtualization: Revolutionizing data cloning
Data Virtualization: Revolutionizing data cloning Kyle Hailey
 
BGOUG "Agile Data: revolutionizing database cloning'
BGOUG  "Agile Data: revolutionizing database cloning'BGOUG  "Agile Data: revolutionizing database cloning'
BGOUG "Agile Data: revolutionizing database cloning'Kyle Hailey
 
Denver devops : enabling DevOps with data virtualization
Denver devops : enabling DevOps with data virtualizationDenver devops : enabling DevOps with data virtualization
Denver devops : enabling DevOps with data virtualizationKyle Hailey
 
Oracle Open World 2014: Lies, Damned Lies, and I/O Statistics [ CON3671]
Oracle Open World 2014: Lies, Damned Lies, and I/O Statistics [ CON3671]Oracle Open World 2014: Lies, Damned Lies, and I/O Statistics [ CON3671]
Oracle Open World 2014: Lies, Damned Lies, and I/O Statistics [ CON3671]Kyle Hailey
 
Jonathan Lewis explains Delphix
Jonathan Lewis explains Delphix Jonathan Lewis explains Delphix
Jonathan Lewis explains Delphix Kyle Hailey
 
DevOps, Databases and The Phoenix Project UGF4042 from OOW14
DevOps, Databases and The Phoenix Project UGF4042 from OOW14DevOps, Databases and The Phoenix Project UGF4042 from OOW14
DevOps, Databases and The Phoenix Project UGF4042 from OOW14Kyle Hailey
 
Delphix for DBAs by Jonathan Lewis
Delphix for DBAs by Jonathan LewisDelphix for DBAs by Jonathan Lewis
Delphix for DBAs by Jonathan LewisKyle Hailey
 
Kscope 14 Presentation : Virtual Data Platform
Kscope 14 Presentation : Virtual Data PlatformKscope 14 Presentation : Virtual Data Platform
Kscope 14 Presentation : Virtual Data PlatformKyle Hailey
 
Data Virtualization: revolutionizing database cloning
Data Virtualization: revolutionizing database cloningData Virtualization: revolutionizing database cloning
Data Virtualization: revolutionizing database cloningKyle Hailey
 
Delphix and DBmaestro
Delphix and DBmaestroDelphix and DBmaestro
Delphix and DBmaestroKyle Hailey
 

More from Kyle Hailey (20)

Hooks in postgresql by Guillaume Lelarge
Hooks in postgresql by Guillaume LelargeHooks in postgresql by Guillaume Lelarge
Hooks in postgresql by Guillaume Lelarge
 
Performance insights twitch
Performance insights twitchPerformance insights twitch
Performance insights twitch
 
Successfully convince people with data visualization
Successfully convince people with data visualizationSuccessfully convince people with data visualization
Successfully convince people with data visualization
 
Virtual Data : Eliminating the data constraint in Application Development
Virtual Data :  Eliminating the data constraint in Application DevelopmentVirtual Data :  Eliminating the data constraint in Application Development
Virtual Data : Eliminating the data constraint in Application Development
 
DBTA Data Summit : Eliminating the data constraint in Application Development
DBTA Data Summit : Eliminating the data constraint in Application DevelopmentDBTA Data Summit : Eliminating the data constraint in Application Development
DBTA Data Summit : Eliminating the data constraint in Application Development
 
Accelerate Develoment with VIrtual Data
Accelerate Develoment with VIrtual DataAccelerate Develoment with VIrtual Data
Accelerate Develoment with VIrtual Data
 
Delphix and Pure Storage partner
Delphix and Pure Storage partnerDelphix and Pure Storage partner
Delphix and Pure Storage partner
 
Martin Klier : Volkswagen for Oracle Guys
Martin Klier : Volkswagen for Oracle GuysMartin Klier : Volkswagen for Oracle Guys
Martin Klier : Volkswagen for Oracle Guys
 
What is DevOps
What is DevOpsWhat is DevOps
What is DevOps
 
Data as a Service
Data as a Service Data as a Service
Data as a Service
 
Data Virtualization: Revolutionizing data cloning
Data Virtualization: Revolutionizing data cloningData Virtualization: Revolutionizing data cloning
Data Virtualization: Revolutionizing data cloning
 
BGOUG "Agile Data: revolutionizing database cloning'
BGOUG  "Agile Data: revolutionizing database cloning'BGOUG  "Agile Data: revolutionizing database cloning'
BGOUG "Agile Data: revolutionizing database cloning'
 
Denver devops : enabling DevOps with data virtualization
Denver devops : enabling DevOps with data virtualizationDenver devops : enabling DevOps with data virtualization
Denver devops : enabling DevOps with data virtualization
 
Oracle Open World 2014: Lies, Damned Lies, and I/O Statistics [ CON3671]
Oracle Open World 2014: Lies, Damned Lies, and I/O Statistics [ CON3671]Oracle Open World 2014: Lies, Damned Lies, and I/O Statistics [ CON3671]
Oracle Open World 2014: Lies, Damned Lies, and I/O Statistics [ CON3671]
 
Jonathan Lewis explains Delphix
Jonathan Lewis explains Delphix Jonathan Lewis explains Delphix
Jonathan Lewis explains Delphix
 
DevOps, Databases and The Phoenix Project UGF4042 from OOW14
DevOps, Databases and The Phoenix Project UGF4042 from OOW14DevOps, Databases and The Phoenix Project UGF4042 from OOW14
DevOps, Databases and The Phoenix Project UGF4042 from OOW14
 
Delphix for DBAs by Jonathan Lewis
Delphix for DBAs by Jonathan LewisDelphix for DBAs by Jonathan Lewis
Delphix for DBAs by Jonathan Lewis
 
Kscope 14 Presentation : Virtual Data Platform
Kscope 14 Presentation : Virtual Data PlatformKscope 14 Presentation : Virtual Data Platform
Kscope 14 Presentation : Virtual Data Platform
 
Data Virtualization: revolutionizing database cloning
Data Virtualization: revolutionizing database cloningData Virtualization: revolutionizing database cloning
Data Virtualization: revolutionizing database cloning
 
Delphix and DBmaestro
Delphix and DBmaestroDelphix and DBmaestro
Delphix and DBmaestro
 

Recently uploaded

SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 

Recently uploaded (20)

SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 

Intro to ASH

  • 1. ASH – Active Session History Feel the Power Kyle Hailey http://perfvision.com
  • 2. #.2 Copyright 2006 Kyle Hailey ASH Whole New Paradigm in Technology The Power of ASH lies in Simplifying Performance Tuning  Totally new and exciting methodology  Cheaper, Quicker, Richer and better tasting too
  • 3. #.3 Copyright 2006 Kyle Hailey Why should you care? Because ASH can Change your life …  10g immediately Accessible  Geeks: Via scripts in SQL (?/rdbms/admin/ashrpt.sql)  Managers : Graphical OEM 10g  Stuck on Oracle 7,8,9 ? … my apologies because 10g rocks, but … no worries, the data is accessible for you too via scripts http://perfvision.com/sash.php
  • 4. #.4 Copyright 2006 Kyle Hailey ASH uses Sampling New Paradigm  Clear Vision of the future  Use new sampling technology  Lets go of the need to know 100%  Statistical approximation  Cheaper  Richer Multidimensional Data  Much more powerful, identifies  SQL  Sessions  Objects  Machine  User
  • 5. #.5 Copyright 2006 Kyle Hailey To identify Players before ASH  Sessions  # sessions x (# wait events + statistics)  Example (150 x (800+200) = 150,000 )  SQL  v$sql  Could be 10000s  Takes out latches that compete with other sql executions  Objects  V$segstat 9i+  Could be 1000s of objects Expensive !
  • 6. #.6 Copyright 2006 Kyle Hailey ASH – Intelligence for the new Millennium  Intelligently Collects Data  It self adjusts for your needs  More activity, more data collected  Less activity, less data collected  Those old methods collected everything  Obfuscated the problem, too many statistics too late  Costly  Too Granular – once an hour ?! Give me a break
  • 7. ASH Samples Session State TIME?? ?? ?? ?? ?? Sessions change a lot quicker but can get the main picture via sampling by sampling faster Every secondEvery second 10:00:00 10:00:01 10:00:02 10:00:03 10:00:04 10:00:05
  • 8. #.8 Copyright 2006 Kyle Hailey Sampling is like taking Pictures
  • 9. #.9 Copyright 2006 Kyle Hailey If happens a lot or for long … we’ll catch it, guaranteed • Long running queries easily foundLong running queries easily found • Short high execution queries found most of the timeShort high execution queries found most of the time • Short low execution queries rarely foundShort low execution queries rarely found Produces a good representation of load on DBProduces a good representation of load on DB
  • 10. #.10 Copyright 2006 Kyle Hailey Session States IO CPU IdleWait WorkWork LatencyLatency ContentionContention
  • 11. #.11 Copyright 2006 Kyle Hailey IDLE  Example : SQL*Net Message from Client  10g  9i or below – just have to keep track  Statspack STATS$IDLE_EVENT select name from v$event_name where wait_class='Idle'; 58 Rows
  • 12. #.12 Copyright 2006 Kyle Hailey CPU  ASH: SESSION_STATE = “ON CPU”  ASH: wait_time > 0 10g: v$session 9i: v$session_wait w.wait_time != 0 /* on CPU */ and s.status='ACTIVE' /* ACTIVE */ Identifying CPU via v$session_wait isIdentifying CPU via v$session_wait is a huge break througha huge break through
  • 13. #.13 Copyright 2006 Kyle Hailey IO  ASH: SESSION_STATE=‘WAITING’ &  10g: WAIT_CLASS=‘User I/O’  9i:  Look at 10g for ideas  db file sequential read  db file scattered read  db file parallel read  direct path read
  • 14. #.14 Copyright 2006 Kyle Hailey WAITING  ASH: SESSION_STATE=‘WAITING’  ASH: WAIT_TIME <= 0  WAIT_CLASS 1. Administrative 2. Application 3. Cluster 4. Commit 5. Concurrency 6. Configuration 7. Network 8. Other 9. Scheduler 10. System I/O  800+ WAIT
  • 15. Session 1 Session 2 Session 3 Session 4 TIME Samples for all users 10:15:00 10:15:01 10:15:02 10:15:03 10:15:04 10:15:05 10:15:06 10:15:07
  • 16. #.16 Copyright 2006 Kyle Hailey v$active_session_history SESSION_ID NUMBER SESSION_SERIAL# NUMBER USER_ID NUMBER SERVICE_HASH NUMBER SESSION_TYPE VARCHAR2(10) PROGRAM VARCHAR2(64) MODULE VARCHAR2(48) ACTION VARCHAR2(32) CLIENT_ID VARCHAR2(64) EVENT VARCHAR2(64) EVENT_ID NUMBER EVENT# NUMBER SEQ# NUMBER P1 NUMBER P2 NUMBER P3 NUMBER WAIT_TIME NUMBER TIME_WAITED NUMBER CURRENT_OBJ# NUMBER CURRENT_FILE# NUMBER CURRENT_BLOCK# NUMBER0 SQL_ID VARCHAR2(13) SQL_CHILD_NUMBER NUMBER SQL_PLAN_HASH_VALUE NUMBER SQL_OPCODE NUMBER QC_SESSION_ID NUMBER QC_INSTANCE_ID NUMBER SAMPLE_ID NUMBER SAMPLE_TIME TIMESTAMP(3) When Session SQL Wait SESSION_STATE VARCHAR2(7) WAIT_TIME NUMBER State TIME_WAITED NUMBER Duration
  • 17. #.17 Copyright 2006 Kyle Hailey Groupings – Top Consumer SESSION_ID SESSION_SERIAL# (signal SID reuse) SESSION_TYPE (FOREGROUND,BACKGROUND) CURRENT_OBJ# CURRENT_FILE# CURRENT_BLOCK# USER_ID (SYS, SYSTEM, SCOTT etc) SERVICE_HASH (OE,GL,HR) PROGRAM (SQL, JDBC, Forms etc) MODULE.ACTION(PLSQL tagging) CLIENT_ID (identifying users in a session pool) SQL_ID QC_SESSION_ID - Query Coordinator QC_INSTANCE_ID – RAC EVENT + P1, P2, P3
  • 18. #.18 Copyright 2006 Kyle Hailey Amazing things YOU can do with ASH Consumers  Top Session  Top User  Top SQL  Top Object  Top Module.Action  Top Program  Top Service  Top Client  Top Wait No machine  - collect on logon trigger X Resources • CPU • Waits • Event (800*) • I/O • File • Block • Time Find top consumers by resource usage
  • 19. #.19 Copyright 2006 Kyle Hailey Select session_id, count(*) from v$active_session_history where session_state= ‘ON CPU‘ and SAMPLE_TIME > sysdate – (5/(24*60)) group by session_id order by count(*) desc; Select session_id, count(*) from v$active_session_history where session_state= ‘ON CPU‘ and SAMPLE_TIME > sysdate – (5/(24*60)) group by session_id order by count(*) desc; Top CPU Session Who is the rogue session ?
  • 20. #.20 Copyright 2006 Kyle Hailey Results Top CPU Session SESSION_ID COUNT(*) ---------- ---------- 265 256 264 15 257 12 271 12 276 1 SESSION_ID COUNT(*) ---------- ---------- 265 256 264 15 257 12 271 12 276 1 SESSION_ID COUNT(*) ---------- ---------- 265 256 264 15 257 12 271 12 276 1
  • 21. #.21 Copyright 2006 Kyle Hailey CPU with Bars SESSION_ID COUNT(*) % Bar ---------- ---------- ---------- ------------ 257 75 25 |*** | 263 62 21 |** | 256 32 11 |* | 264 9 3 | | 277 3 1 | | 258 1 0 | | 280 1 0 | | SESSION_ID COUNT(*) % Bar ---------- ---------- ---------- ------------ 257 75 25 |*** | 263 62 21 |** | 256 32 11 |* | 264 9 3 | | 277 3 1 | | 258 1 0 | | 280 1 0 | | Bar shows 10% incrementsBar shows 10% increments
  • 22. #.22 Copyright 2006 Kyle Hailey Select session_id, count(*) from v$active_session_history where session_state=‘WAITING’ and SAMPLE_TIME > SYSDATE - (5/(24*60)) group by session_id order by count(*) desc; Select session_id, count(*) from v$active_session_history where session_state=‘WAITING’ and SAMPLE_TIME > SYSDATE - (5/(24*60)) group by session_id order by count(*) desc; Top Waiting Session  Top Waiting Session in last 5 minutes
  • 23. #.23 Copyright 2006 Kyle Hailey SESSION_ID COUNT(*) ---------- ---------- 272 224 254 8 249 5 276 5 277 4 270 1 SESSION_ID COUNT(*) ---------- ---------- 272 224 254 8 249 5 276 5 277 4 270 1 Top Waiting Session Results
  • 24. #.24 Copyright 2006 Kyle Hailey Top SQL from ASH select ash.SQL_ID , sum(decode(ash.session_state,'ON CPU',1,0)) "CPU", sum(decode(ash.session_state,'WAITING',1,0)) - sum(decode(ash.session_state,'WAITING', decode(en.wait_class, 'User I/O',1,0),0)) "WAIT" , sum(decode(ash.session_state,'WAITING', decode(en.wait_class, 'User I/O',1,0),0)) "IO" , sum(decode(ash.session_state,'ON CPU',1,1)) "TOTAL" from v$active_session_history ash, v$event_name en where SQL_ID is not NULL and en.event#=ash.event# group by sql_id order by sum(decode(session_state,'ON CPU',1,1)) desc select ash.SQL_ID , sum(decode(ash.session_state,'ON CPU',1,0)) "CPU", sum(decode(ash.session_state,'WAITING',1,0)) - sum(decode(ash.session_state,'WAITING', decode(en.wait_class, 'User I/O',1,0),0)) "WAIT" , sum(decode(ash.session_state,'WAITING', decode(en.wait_class, 'User I/O',1,0),0)) "IO" , sum(decode(ash.session_state,'ON CPU',1,1)) "TOTAL" from v$active_session_history ash, v$event_name en where SQL_ID is not NULL and en.event#=ash.event# group by sql_id order by sum(decode(session_state,'ON CPU',1,1)) desc
  • 25. #.25 Copyright 2006 Kyle Hailey Top SQL from ASH Results SQL_ID CPU WAITING IO TOTAL ------------- ---------- ---------- ---------- ---------- 4c1xvq9ufwcjc 23386 0 0 23386 6wjw6rz5uvbp3 99 0 23 122 968dm8hr9qd03 97 0 22 119 938jp5gasmrah 90 0 25 115 cv8xnv81kf582 42 0 9 51 6p9bzu19v965k 21 0 0 21 5zu8pxnun66bu 15 0 0 15 db2jr13nup72v 9 0 0 9 7ks5gnj38hghv 8 0 0 8 SQL_ID CPU WAITING IO TOTAL ------------- ---------- ---------- ---------- ---------- 4c1xvq9ufwcjc 23386 0 0 23386 6wjw6rz5uvbp3 99 0 23 122 968dm8hr9qd03 97 0 22 119 938jp5gasmrah 90 0 25 115 cv8xnv81kf582 42 0 9 51 6p9bzu19v965k 21 0 0 21 5zu8pxnun66bu 15 0 0 15 db2jr13nup72v 9 0 0 9 7ks5gnj38hghv 8 0 0 8
  • 26. #.26 Copyright 2006 Kyle Hailey Top Session select ash.session_id, ash.session_serial#, ash.user_id, ash.program, sum(decode(ash.session_state,'ON CPU',1,0)) "CPU", sum(decode(ash.session_state,'WAITING',1,0)) - sum(decode(ash.session_state,'WAITING', decode(en.wait_class,'User I/O',1, 0 ), 0)) "WAITING" , sum(decode(ash.session_state,'WAITING', decode(en.wait_class,'User I/O',1, 0 ), 0)) "IO" , sum(decode(session_state,'ON CPU',1,1)) "TOTAL" from v$active_session_history ash, v$event_name en where en.event# = ash.event# group by session_id,user_id,session_serial#,program order by sum(decode(session_state,'ON CPU',1,1)) select ash.session_id, ash.session_serial#, ash.user_id, ash.program, sum(decode(ash.session_state,'ON CPU',1,0)) "CPU", sum(decode(ash.session_state,'WAITING',1,0)) - sum(decode(ash.session_state,'WAITING', decode(en.wait_class,'User I/O',1, 0 ), 0)) "WAITING" , sum(decode(ash.session_state,'WAITING', decode(en.wait_class,'User I/O',1, 0 ), 0)) "IO" , sum(decode(session_state,'ON CPU',1,1)) "TOTAL" from v$active_session_history ash, v$event_name en where en.event# = ash.event# group by session_id,user_id,session_serial#,program order by sum(decode(session_state,'ON CPU',1,1)) select ash.session_id, ash.session_serial#, ash.user_id, ash.program, sum(decode(ash.session_state,'ON CPU',1,0)) "CPU", sum(decode(ash.session_state,'WAITING',1,0)) - sum(decode(ash.session_state,'WAITING', decode(en.wait_class,'User I/O',1, 0 ), 0)) "WAITING" , sum(decode(ash.session_state,'WAITING', decode(en.wait_class,'User I/O',1, 0 ), 0)) "IO" , sum(decode(session_state,'ON CPU',1,1)) "TOTAL" from v$active_session_history ash, v$event_name en where en.event# = ash.event# group by session_id,user_id,session_serial#,program order by sum(decode(session_state,'ON CPU',1,1))
  • 27. #.27 Copyright 2006 Kyle Hailey Top Session Results SESSION_ID SERIAL# USER_ID PROGRAM CPU WAITING IO ---------- ------- ---------- ------------------------- ------- ---------- ---------- 247 61970 1 sqlplus 11698 0 0 277 1 0 oracle@labsfrh903 (LGWR) 14 21 0 276 1 0 oracle@labsfrh903 (CKPT) 19 10 0 278 1 0 oracle@labsfrh903 (DBW0) 29 0 0 280 1 0 oracle@labsfrh903 (PMON) 19 0 0 254 22617 5 Executor.exe 13 0 3 255 12877 5 Executor.exe 11 0 5 257 33729 5 Executor.exe 15 0 1 255 13417 5 Executor.exe 14 0 2 SESSION_ID SERIAL# USER_ID PROGRAM CPU WAITING IO ---------- ------- ---------- ------------------------- ------- ---------- ---------- 247 61970 1 sqlplus 11698 0 0 277 1 0 oracle@labsfrh903 (LGWR) 14 21 0 276 1 0 oracle@labsfrh903 (CKPT) 19 10 0 278 1 0 oracle@labsfrh903 (DBW0) 29 0 0 280 1 0 oracle@labsfrh903 (PMON) 19 0 0 254 22617 5 Executor.exe 13 0 3 255 12877 5 Executor.exe 11 0 5 257 33729 5 Executor.exe 15 0 1 255 13417 5 Executor.exe 14 0 2
  • 28. #.28 Copyright 2006 Kyle Hailey Top Session w/ Username select decode(nvl(to_char(s.sid),-1),-1,'DISCONNECTED','CONNECTED') "STATUS", topsession.session_id "SESSION_ID", u.name "NAME", topsession.program "PROGRAM", max(topsession.CPU) "CPU", max(topsession.WAITING) "WAITING", max(topsession.IO) "IO", max(topsession.TOTAL) "TOTAL" from ( {previous query} ) topsession, v$session s, user$ u where u.user# =topsession.user_id and /* outer join to v$session because the session might be disconnected */ topsession.session_id = s.sid (+) and topsession.session_serial# = s.serial# (+) group by topsession.session_id, topsession.session_serial#, topsession.user_id, topsession.program, s.username,s.sid,s.paddr,u.name order by max(topsession.TOTAL) desc select decode(nvl(to_char(s.sid),-1),-1,'DISCONNECTED','CONNECTED') "STATUS", topsession.session_id "SESSION_ID", u.name "NAME", topsession.program "PROGRAM", max(topsession.CPU) "CPU", max(topsession.WAITING) "WAITING", max(topsession.IO) "IO", max(topsession.TOTAL) "TOTAL" from ( {previous query} ) topsession, v$session s, user$ u where u.user# =topsession.user_id and /* outer join to v$session because the session might be disconnected */ topsession.session_id = s.sid (+) and topsession.session_serial# = s.serial# (+) group by topsession.session_id, topsession.session_serial#, topsession.user_id, topsession.program, s.username,s.sid,s.paddr,u.name order by max(topsession.TOTAL) desc
  • 29. #.29 Copyright 2006 Kyle Hailey Top Session Finding a Rogue User STATUS SESSION_ID NAME PROGRAM CPU WAITING IO --------------- ---------- ---------- ------------------------- ----- ---------- ---- CONNECTED 247 CPU_Monger ChMgr304.exe 11704 0 0 CONNECTED 277 SYS oracle@labsfrh903 (LGWR) 14 19 0 CONNECTED 278 SYS oracle@labsfrh903 (DBW0) 29 0 0 CONNECTED 276 SYS oracle@labsfrh903 (CKPT) 18 9 0 CONNECTED 280 SYS oracle@labsfrh903 (PMON) 20 0 0 DISCONNECTED 255 SYSTEM Executor.exe 11 4 5 DISCONNECTED 257 SYSTEM Executor.exe 13 0 3 DISCONNECTED 255 SYSTEM Executor.exe 14 0 2 DISCONNECTED 257 SYSTEM Executor.exe 13 0 3 STATUS SESSION_ID NAME PROGRAM CPU WAITING IO --------------- ---------- ---------- ------------------------- ----- ---------- ---- CONNECTED 247 CPU_Monger ChMgr304.exe 11704 0 0 CONNECTED 277 SYS oracle@labsfrh903 (LGWR) 14 19 0 CONNECTED 278 SYS oracle@labsfrh903 (DBW0) 29 0 0 CONNECTED 276 SYS oracle@labsfrh903 (CKPT) 18 9 0 CONNECTED 280 SYS oracle@labsfrh903 (PMON) 20 0 0 DISCONNECTED 255 SYSTEM Executor.exe 11 4 5 DISCONNECTED 257 SYSTEM Executor.exe 13 0 3 DISCONNECTED 255 SYSTEM Executor.exe 14 0 2 DISCONNECTED 257 SYSTEM Executor.exe 13 0 3
  • 30. #.30 Copyright 2006 Kyle Hailey Act.sql : DB Detailed AAS @act Analysis Begin Time : 2007-07-24 11:04:48 Analysis End Time : 2007-07-24 11:19:45 Start time, mins ago: 15 Request Duration : 15 Collections : 528 Data Values : 3327 Elapsed Time: 15 mins WAIT_EVENT CNT % Active Ave_Act_Sess -------------------------------------- ---------- ------------ latch free 10 .3 .02 log buffer space 13 .39 .02 buffer busy waits 14 .42 .03 db file scattered read 15 .45 .03 library cache pin 78 2.34 .15 log file sync 213 6.4 .4 ON CPU 726 21.82 1.38 enqueue 855 25.7 1.62 db file sequential read 1399 42.05 2.65 ------------ sum 6.3 @act Analysis Begin Time : 2007-07-24 11:04:48 Analysis End Time : 2007-07-24 11:19:45 Start time, mins ago: 15 Request Duration : 15 Collections : 528 Data Values : 3327 Elapsed Time: 15 mins WAIT_EVENT CNT % Active Ave_Act_Sess -------------------------------------- ---------- ------------ latch free 10 .3 .02 log buffer space 13 .39 .02 buffer busy waits 14 .42 .03 db file scattered read 15 .45 .03 library cache pin 78 2.34 .15 log file sync 213 6.4 .4 ON CPU 726 21.82 1.38 enqueue 855 25.7 1.62 db file sequential read 1399 42.05 2.65 ------------ sum 6.3
  • 31. #.31 Copyright 2006 Kyle Hailey Aveact.sql : AAS over time @aveact TM NPTS AVEACT GRAPH CPU WAITS ---------------- ------ ------- ---------------------- ---- ----- 06-AUG 13:00:00 270 .33 +- 2 29 59 06-AUG 14:00:00 1040 2.24 ++--------2--- 341 1984 06-AUG 15:00:00 623 6.67 ++++------2---------- 438 3718 06-AUG 16:00:00 1088 2.59 ++--------2---- 335 2486 06-AUG 17:00:00 1104 1.26 ++----- 2 349 1043 06-AUG 18:00:00 1093 1.38 +++---- 2 663 842 06-AUG 19:00:00 1012 1.74 ++------- 2 373 1388 06-AUG 20:00:00 1131 .99 +---- 2 304 820 06-AUG 21:00:00 1111 1.22 ++----- 2 344 1012 06-AUG 22:00:00 1010 1.66 ++------ 2 414 1259 06-AUG 23:00:00 1120 1.08 +---- 2 298 913 07-AUG 00:00:00 1024 .83 +--- 2 273 576 07-AUG 01:00:00 1006 1.74 ++------- 2 319 1428 07-AUG 02:00:00 1090 2.47 ++--------2---- 347 2345 07-AUG 03:00:00 687 6.59 +++-------2---------- 382 4142 07-AUG 04:00:00 1004 1.95 ++++++--- 2 1299 659 07-AUG 05:00:00 1104 3.08 +++++-----2------ 1170 2226 07-AUG 06:00:00 1122 1.91 +++++++-- 2 1582 558 07-AUG 07:00:00 1115 1.06 +++--- 2 559 618 07-AUG 08:00:00 1140 .81 ++-- 2 403 519 07-AUG 09:00:00 1128 .88 ++--- 2 386 601 @aveact TM NPTS AVEACT GRAPH CPU WAITS ---------------- ------ ------- ---------------------- ---- ----- 06-AUG 13:00:00 270 .33 +- 2 29 59 06-AUG 14:00:00 1040 2.24 ++--------2--- 341 1984 06-AUG 15:00:00 623 6.67 ++++------2---------- 438 3718 06-AUG 16:00:00 1088 2.59 ++--------2---- 335 2486 06-AUG 17:00:00 1104 1.26 ++----- 2 349 1043 06-AUG 18:00:00 1093 1.38 +++---- 2 663 842 06-AUG 19:00:00 1012 1.74 ++------- 2 373 1388 06-AUG 20:00:00 1131 .99 +---- 2 304 820 06-AUG 21:00:00 1111 1.22 ++----- 2 344 1012 06-AUG 22:00:00 1010 1.66 ++------ 2 414 1259 06-AUG 23:00:00 1120 1.08 +---- 2 298 913 07-AUG 00:00:00 1024 .83 +--- 2 273 576 07-AUG 01:00:00 1006 1.74 ++------- 2 319 1428 07-AUG 02:00:00 1090 2.47 ++--------2---- 347 2345 07-AUG 03:00:00 687 6.59 +++-------2---------- 382 4142 07-AUG 04:00:00 1004 1.95 ++++++--- 2 1299 659 07-AUG 05:00:00 1104 3.08 +++++-----2------ 1170 2226 07-AUG 06:00:00 1122 1.91 +++++++-- 2 1582 558 07-AUG 07:00:00 1115 1.06 +++--- 2 559 618 07-AUG 08:00:00 1140 .81 ++-- 2 403 519 07-AUG 09:00:00 1128 .88 ++--- 2 386 601
  • 32. #.32 Copyright 2006 Kyle Hailey Aveact.sql
  • 33. #.33 Copyright 2006 Kyle Hailey ““-” = WAIT-” = WAIT ““+” = CPU+” = CPU which waits ? -> aveactn.sqlwhich waits ? -> aveactn.sql
  • 35. #.35 Copyright 2006 Kyle Hailey Many Ways to Attack Problems Confusing  How to Attack the problem?  Top SQL?  Top wait for that SQL?  Top Waiting Session ?  Top Waits for that Session  Top Waits for Database?  Top Session waiting for that wait  Top SQL for that wait Solution - Graphics
  • 36. #.36 Copyright 2006 Kyle Hailey Mining Data is Non Trivial  Many Dimensions to consider  Constantly Varying time frames  Luckily 10g automates all of this functionality.  collects all of the data  analyses all the wait events  reports on bottlenecks  supplies solutions  Graphics add tremendous ease and power
  • 37. Session 1 Session 2 Session 3 Session 4 TIME Graphical ASH
  • 38. #.38 Copyright 2006 Kyle Hailey Graph of User States
  • 39. #.39 Copyright 2006 Kyle Hailey One Second Graph
  • 40. #.40 Copyright 2006 Kyle Hailey 15 Second Averages
  • 41. #.41 Copyright 2006 Kyle Hailey Maximum CPU Line
  • 42. #.42 Copyright 2006 Kyle Hailey Idle Users
  • 43. #.43 Copyright 2006 Kyle Hailey OEM Perf Page
  • 44. #.44 Copyright 2006 Kyle Hailey OEM Perf Page
  • 45. #.45 Copyright 2006 Kyle Hailey ASH vs Statistics  Statistics  are more expensive  have lag time  lack clear identification of culprits
  • 46. #.46 Copyright 2006 Kyle Hailey Statistic Lag Time CountersCounters SamplesSamples Slight LagsSlight Lags
  • 47. #.47 Copyright 2006 Kyle Hailey CPU Lag Problem  ASH is the only way to see CPU usage realtime  V$sysstat reports CPU but  is only updated at the end of the call.  Long calls look deceiving like no CPU is being used
  • 48. #.48 Copyright 2006 Kyle Hailey CPU in ASH vs Stats
  • 49. #.49 Copyright 2006 Kyle Hailey ASH Sampling Cheap Three Methods 1.With PL/SQL it’s less that 1 % CPU with 10 average active sessions 2.DMA - direct memory attach to SGA Using C code 200x Cheaper 3.ASH in 10g should be even cheaper than DMA because it’s done in the kernel
  • 50. #.50 Copyright 2006 Kyle Hailey ASH – In Memory  Collects active session data only  History v$session_wait + v$session + extras  Circular Buffer - 1M to 128M (~2% of SGA)  Flushed every hour to disk or when buffer 2/3 full (it protects itself so you can relax)
  • 51. #.51 Copyright 2006 Kyle Hailey ASH Sizing …  Avg row around 150bytes  3600 secs in an hour  ~ ½ Meg per Active Session per hour  That’s generally over an hour of ASH
  • 52. #.52 Copyright 2006 Kyle Hailey How ASH works V$session_wait + v$session + extras MMON/ MMNL v$active_session_history wrh$_active_session_history Only writes out 1 in 10 rows via direct path inserts
  • 53. #.53 Copyright 2006 Kyle Hailey Select reads backwards -No latching -No read consistency -Index on time Insert point ASH buffer Insert one direction - Touch up wait times
  • 54. #.54 Copyright 2006 Kyle Hailey Family of ASH Tables v$session_wait v$active_session_history wrh$active_session_history V$session_wait_history DBA_HIST_ACTIVE_SESS_HISTORY
  • 55. #.55 Copyright 2006 Kyle Hailey ASH Tables v$session_wait SID SEQ# EVENT P1TEXT P1 P1RAW P2TEXT P2 P2RAW P3TEXT P3 P3RAW WAIT_CLASS_ID WAIT_CLASS# WAIT_CLASS WAIT_TIME SECONDS_IN_WAIT STATE v$session_wait_history SID SEQ# EVENT# EVENT P1TEXT P1 P2TEXT P2 P3TEXT P3 WAIT_TIME v$event_name EVENT_ID EVENT# EVENT_ID NAME PARAMETER1 PARAMETER2 PARAMETER3 WAIT_CLASS_ID WAIT_CLASS# WAIT_CLASS v$active_session_history SAMPLE_ID SAMPLE_TIME SESSION_ID SESSION_SERIAL# USER_ID SQL_ID SQL_CHILD_NUMBER SQL_PLAN_HASH_VALUE SQL_OPCODE SERVICE_HASH SESSION_TYPE SESSION_STATE QC_SESSION_ID QC_INSTANCE_ID SEQ# EVENT# P1 P2 P3 WAIT_TIME TIME_WAITED CURRENT_OBJ# CURRENT_FILE# CURRENT_BLOCK# PROGRAM MODULE ACTION CLIENT_ID current 10 samples hour DBA_HIST_ACTIVE_SESS_HISTORY wrh$active_session_history SNAP_D DBID INSTANCE_NUMBER SAMPLE_ID SAMPLE_TIME SESSION_ID SESSION_SERIAL# USER_ID SQL_ID SQL_CHILD_NUMBER SQL_PLAN_HASH_VALUE SQL_OPCODE SERVICE_HASH SESSION_TYPE SESSION_STATE QC_SESSION_ID QC_INSTANCE_ID SEQ# EVENT_ID P1 P2 P3 WAIT_TIME TIME_WAITED CURRENT_OBJ# CURRENT_FILE# CURRENT_BLOCK# PROGRAM MODULE ACTION CLIENT_ID 7 days (disk) 1 in 10
  • 56. #.56 Copyright 2006 Kyle Hailey Wait Time vs Time Waited  SESSION_STATE  Waiting, on CPU  Based on WAIT_TIME  WAIT_TIME (v$session, v$session_wait, v$ash)  0 => waiting  >0 => CPU (value is time of last wait)  TIME_WAITED  Actual time waited for event  0 until wait finishes  Fix up values (no one else can do this)
  • 57. #.57 Copyright 2006 Kyle Hailey Oradebug  Dump to trace file SQL> oradebug dump ash 5 SQL> Alter session set events ‘immediate tracename ashdump level 5’; level 5 = # of minutes loader file rdbms/demo/ashldr.ctl SQL> oradebug dump ashdump 5 SQL> Alter session set events ‘immediate tracename ashdump level 5’;
  • 58. #.58 Copyright 2006 Kyle Hailey INIT.ORA statistics_level = Typical (default) PARAMETER SESSION_VALUE INSTANCE_VAL ----------------------- ---------- ------------ _ash_sampling_interval 1000 1000 milliseconds _ash_size 1048618 1048618 ASH buffer size _ash_enable TRUE TRUE Turn on/off ASH sampling, flushing and the V$ views on ASH _ash_disk_write_enable TRUE TRUE Flush to disk _ash_disk_filter_ratio 10 10 write 1 in 10 points _ash_sample_all FALSE FALSE Sample including idle waits
  • 59. #.59 10.2 ASH Extras  BLOCKING_SESSION  BLOCKING_SESSION_STATUS  BLOCKING_SESSION_SERIAL#  P1TEXT  P2TEXT  P3TEXT  WAIT_CLASS  WAIT_CLASS_ID  XID  FORCE_MATCHING_SIGNATURE 5901/30/15
  • 60. #.60 Copyright 2006 Kyle Hailey 10.2 Extras  10gR2 add fields to ASH  Blocking Session Id, serial# and state ***  XID, transaction ID  RAC event Fixup  Plan Hash Fix up  10gR1 - during parsing no plan, good way to find parsing problems  10gR2 – get plan hash fixup – good but lose some ability to find parsing problems  Wait Class, needed this for grouping  Force_matching_signature – sql profile id
  • 61. #.61 10.2.0.3 ASH Extras PLSQL_ENTRY_OBJECT_ID PLSQL_ENTRY_SUBPROGRAM_ID PLSQL_OBJECT_ID PLSQL_SUBPROGRAM_ID 6101/30/15 ALL_PROCEDURESALL_PROCEDURES where object_id = plsql_object_idwhere object_id = plsql_object_id and subprogram_id = plsql_subprogram_idand subprogram_id = plsql_subprogram_id
  • 62. #.62 6201/30/15 PLSQL Tracking Package/Procedure/SQL tracking 10.2.0.3 calling_code SQL_ID COUNT(*) ----------------------------------------------- ---------- ORDERENTRY.NEWORDER 0uuqgjq7k12nf 258 ORDERENTRY.NEWCUSTOMER 0bzhqhhj9mpaa 262 ORDERENTRY.BROWSEANDUPDATEORDERS 41zu158rqf4kf 301 ORDERENTRY.NEWORDER 0yas01u2p9ch4 569 PARSE_SAME 3vjxpmhhzngu4 874 ORDERENTRY.BROWSEANDUPDATEORDERS 05s4vdwsf5802 1669 select object_name package||.|| procedure_name, sql_id, count(*) from v$active_session_history ash, all_procedures procs where ash.PLSQL_ENTRY_OBJECT_ID = procs.object_id and ash.PLSQL_ENTRY_SUBPROGRAM_ID = procs.SUBPROGRAM_ID
  • 63. #.63 Copyright 2006 Kyle Hailey 11g ASH extras SQL ElapsedSQL Elapsed SQL_EXEC_ID SQL_EXEC_START IN_CONNECTION_MGMT IN_PARSE IN_HARD_PARSE IN_SQL_EXECUTION IN_PLSQL_EXECUTION IN_PLSQL_RPC IN_PLSQL_COMPILATION IN_JAVA_EXECUTION IN_BIND IN_CURSOR_CLOSE SQL_PLAN_LINE_ID SQL_PLAN_OPERATION SQL_PLAN_OPTIONS CURRENT_ROW# EVENT# QC_SESSION_SERIAL# CONSUMER_GROUP_ID FLAGS ETCETC CPU Analysis – non TimedCPU Analysis – non Timed SQL Row SourceSQL Row Source REMOTE_INSTANCE# RAC – remote transfersRAC – remote transfers TOP_LEVEL_SQL_ID TOP_LEVEL_SQL_OPCODE Recursive SQLRecursive SQL
  • 64. #.64 Copyright 2006 Kyle Hailey 11g ASH extras Run-time SQL row source information  Identifies current row source within plan SQL execution ID  Is this same execution as last sample?  can see how long sql has been running Operation bit vector  Capture non-timed operations  Examples: fetch, binding, close Remote instance id for Cache transfers  Which instance sourced requested block?
  • 65. #.65 Copyright 2006 Kyle Hailey How Many Active Sessions?  How much data does ASH Collect ?  1 CPU means max 1 Avg Active Session unless there is a bottleneck Big site examples:  Oracle 4 way RAC internal apps  10,000 connected, 200 active  One Site  3000 connected, 30 Active  Site  12,000 connected, 100 active
  • 66. #.66 Copyright 2006 Kyle Hailey Simulating ASH  ASH is new in 10g  ASH data exist since V7  Need Diagnostic Pack License   Collect it yourself   SASH – Simulated ASH http://perfvision.com/sash.php  Graphical Monitor http://perfvision.com/ashmon.php Consumes < 1% CPU for 10 active sessions (a lot)
  • 67. #.67 Copyright 2006 Kyle Hailey Sampling  Sampling is the future  Took clean vision to create  Bit of a leap of faith  Less Accurate but more powerful than past  Inaccuracies unimportant for the most part  Feasible since version 7  You can implement it yourself  Graphics are the only way to full harness the power
  • 68. #.68 Copyright 2006 Kyle Hailey Summary  To solve hard problems you need Sampling  If you have 10g and a license you can use  V$active_session_history  OEM 10g (can access some 9 sampling)  ?/rdbms/admim/ashrpt.sql  If you are on 7,8,9 or 10g without the license  Need custom sampling  SASH – Simulated ASH http://perfvision.com/ash.php  ASHMON – graphical http://perfvision.com/ashmon.php
  • 69. #.69 Copyright 2006 Kyle Hailey ASH Summary Faster, Cheaper, instant (no lag) … but most importantly Rich & Multidimensional  Overview of system load  Drilldowns into problems  Sql  Session  Wait event  Details information on problem resolution  OEM simplifies mining of ASH data

Editor's Notes

  1. Sampling is a leap in performance tuning technology. It took a clear vision of the future and a bit of a leap of faith to let go of the compulsive need to have exact measurements and instead embrace sampling a technology that statistically approximates the same value with little loss of accuracy but at the same time brings a much great wealth of information necessary for analyzing the performance of a database.
  2. pmon timer rdbms ipc message wait for unread message on broadcast channel wait for unread message on multiple broadcast channels ges remote message ges reconfiguration to start gcs remote message PX Deq: Par Recov Reply PX Deq: Par Recov Execute PX Deq: Par Recov Change Vector wait for activate message wakeup event for builder wakeup event for preparer wakeup event for reader wait for transaction parallel recovery coordinator waits for cleanup of slaves smon timer PX Deq: Txn Recovery Start PX Deq: Txn Recovery Reply statement suspended, wait error to be cleared PX Deq: Index Merge Reply PX Deq: Index Merge Execute PX Deq: Index Merge Close PX Deq: kdcph_mai PX Deq: kdcphc_ack virtual circuit status dispatcher timer jobq slave wait pipe get PX Deque wait PX Idle Wait PX Deq: Join ACK PX Deq Credit: need buffer PX Deq: Msg Fragment PX Deq: Parse Reply PX Deq: Execute Reply PX Deq: Execution Msg PX Deq: Table Q Normal PX Deq: Table Q Sample single-task message SQL*Net message from client SQL*Net message from dblink PL/SQL lock timer queue messages wakeup time manager AQ Proxy Cleanup Wait Queue Monitor Wait Queue Monitor Slave Wait Queue Monitor Shutdown Wait Queue Monitor IPC wait STREAMS apply coord waiting for slave message STREAMS fetch slave waiting for txns STREAMS apply slave idle wait STREAMS capture process filter callback wait for ruleset waiting for subscribers to catch up waiting for low memory condition to be resolved HS message to agent JS external job
  3. WAIT_TIME is time of last wait, &amp;gt; 0 , means on CPU TIME_WAITED is the actual wait time
  4. Select session_id, session_serial# , count(*) , round((count(*)*100)/(5*60),0) &amp;quot;%&amp;quot;, lpad(&amp;apos;*&amp;apos;,round((count(*)*10)/(5*60),0),&amp;apos;*&amp;apos;) &amp;quot;Bar&amp;quot; from v$active_session_history where session_state= &amp;apos;ON CPU&amp;apos; and SAMPLE_TIME &amp;gt; sysdate - (5/(24*60)) group by session_id, session_serial# order by count(*) desc /
  5. Graphics – humans can process 400,000 times as much data graphically as textually Think of a map of the US and all the counties with birth rates colored from low to high. It’s a massive about of information textually but it can all be seen on one page of a map Select session_id, session_serial# , count(*) , round((count(*)*100)/(5*60),0) &amp;quot;%&amp;quot;, lpad(&amp;apos;*&amp;apos;,round((count(*)*10)/(5*60),0),&amp;apos;*&amp;apos;) &amp;quot;Bar&amp;quot; from v$active_session_history where session_state= &amp;apos;ON CPU&amp;apos; and SAMPLE_TIME &amp;gt; sysdate - (5/(24*60)) group by session_id, session_serial# order by count(*) desc /
  6. Size of Ash --- Algorithm used to estimate ASH buffers sizememory_quota = max(2% of sga_target, 5% of shared_pool_size); /* sga_target = 0 when AUTO SGA is OFF */cpu_quota    = 2MB * (# of CPUs);ash_size     = min( cpu_quota, memory_quota );ash_size     = max( 1MB, ash_size); /* atleast 1MB */ash_size     = min( 128MB, ash_size); /* atmost 128MB */---
  7. ASH _ash_enable = false; [ A dynamic parameter will turn off ASH sampling, flushing and the V$ views on ASH ] ADDM _addm_auto_enable = false; [ A dynamic parameter to turn off automatic ADDM runs after every AWR snapshot ] AWR &amp;quot;_swrf_mmon_flush&amp;quot; = FALSE ; AWR metrics &amp;quot;_swrf_mmon_metrics&amp;quot; = FALSE ; METRICS DB Feature Usage &amp;quot;_swrf_mmon_dbfus&amp;quot; = FALSE ; DB Feature Usage &amp;quot;_swrf_on_disk_enabled&amp;quot; = FALSE ; disable all (on disk, including manual) AWR operations:
  8. set linesize 120 col entry_package for a25 col entry_procedure for a25 col cur_package for a25 col cur_procedure for a25 col calling_code for a70 select procs1.object_name || decode(procs1.procedure_name,&amp;apos;&amp;apos;,&amp;apos;&amp;apos;,&amp;apos;.&amp;apos;)|| procs1.procedure_name ||&amp;apos; &amp;apos;|| decode(procs2.object_name,procs1.object_name,&amp;apos;&amp;apos;,procs2.object_name) || decode(procs2.procedure_name,procs1.procedure_name,&amp;apos;&amp;apos;, decode(procs2.procedure_name,&amp;apos;&amp;apos;,&amp;apos;&amp;apos;,null,&amp;apos;&amp;apos;,&amp;apos;.&amp;apos;)||procs2.procedure_name) &amp;quot;calling_code&amp;quot;, sql_id, count(*) from v$active_session_history ash, all_procedures procs1, all_procedures procs2 where ash.PLSQL_ENTRY_OBJECT_ID = procs1.object_id (+) and ash.PLSQL_ENTRY_SUBPROGRAM_ID = procs1.SUBPROGRAM_ID (+) and ash.PLSQL_OBJECT_ID = procs2.object_id (+) and ash.PLSQL_SUBPROGRAM_ID = procs2.SUBPROGRAM_ID (+) and ash.sample_time &amp;gt; sysdate - &amp;minutes/(60*24) group by procs1.object_name, procs1.procedure_name, procs2.object_name, procs2.procedure_name,sql_id order by count(*) /
  9. ASH is a leap in performance tuning technology. It took a clear vision of the future and a bit of a leap of faith to let go of the compulsive need to have exact measurements and instead embrace sampling a technology that statistically approximates the same value with little loss of accuracy but at the same time brings a much great wealth of information necessary for analyzing the performance of a database. ASH can be simulated on any version of Oracle since v7 with the simple act of repeatedly sampling and storing the values from v$session_wait into a historic table. Although the ideas is easy, the implementation turns out to be fairly complex. Luckily Oracle implements not only ASH in version 10g but more importantly Oracle implements a diagnostic package that reads the data, analyzes the data and report the findings and solutions automatically so you don’t even need to know all the esoteric wait analysis. The best part of all is OEM 10g exposes all the data and analysis graphically provide an interface that communicates quickly and clearly the date of the system.