【性能调优】Oracle AWR报告指标全解析

绝对干货!|【性能调优】Oracle AWR报告指标全解析
啥是AWR?==============================

(Automatic Workload Repository)

一堆历史性能数据,放在SYSAUX表空间上, AWR和SYSAUX都是10g出现的,是Oracle调优的关键特性;
默认快照间隔1小时,10g保存7天、11g保存8天;
AWR程序核心是dbms_workload_repository包@?/rdbms/admin/awrrpt 本实例
@?/rdbms/admin/awrrpti RAC中选择实例号

谁维护AWR?
主要是MMON(Manageability Monitor Process)和它的小工进程(m00x)
MMON的功能包括:
1.启动slave进程m00x去做AWR快照
2.当某个度量阀值被超过时发出alert告警
3.为最近改变过的SQL对象捕获指标信息AWR小技巧
手动执行一个快照:

Exec dbms_workload_repository.create_snapshot;

创建一个AWR基线

Exec DBMS_WORKLOAD_REPOSITORY.CREATE_BASELINE(start_snap_id,end_snap_id ,baseline_name);
@?/rdbms/admin/awrddrpt AWR比对报告
@?/rdbms/admin/awrgrpt RAC 全局AWR

1、报告总结

WORKLOAD REPOSITORY report for

DB NameDB IdInstanceInst numStartup TimeReleaseRAC
CUFS3961207481cufs124-Aug-19 21:0811.2.0.4.0NO
Host NamePlatformCPUsCoresSocketsMemory (GB)
databaseLinux x86 64-bit1616431.48

Snap IdSnap TimeSessionsCursors/Session
Begin Snap:951204-Dec-19 10:00:20859.3
End Snap:951304-Dec-19 11:00:28803.4
Elapsed:
60.14 (mins)

DB Time:
64.77 (mins)

Elapsed为该AWR性能报告的时间跨度(自然时间的跨度,例如前一个快照snapshot是9点生成的,后一个快照snapshot是11点生成的,

则若使用@?/rdbms/admin/awrrpt 脚本中指定这2个快照的话,那么其elapsed = (11-9)=2 个小时)


一个AWR性能报告至少需要2个AWR snapshot性能快照才能生成 ( 这2个快照时间实例不能重启过,否则指定这2个快照生成AWR性能报告会报错),


DB TIME= 所有前台session花费在database调用上的总和时间:注意是前台进程foreground sessions


包括CPU时间、IO Time、和其他一系列非空闲等待时间
DB TIME 不等于 响应时间,DB TIME高了未必响应慢,DB TIME低了未必响应快DB Time描绘了数据库总体负载,但要和elapsed time结合其来。Average Active Session AAS= DB time/Elapsed Time
DB Time =60min,Elapsed Time =60min AAS=60/60=1 负载一般
DB Time= 1min,Elapsed Time= 60min AAS= 1/60 负载很轻
DB Time= 60000min,Elapsed Time=60min AAS=1000 系统hang住
DB TIME= DB CPU + Non-Idle Wait + Wait on CPU queue如果仅有2个逻辑CPU,而2个session在60分钟都没等待事件,一直跑在CPU上,那么:DB CPU=2*60mins , DB Time =2*60 +0 +0 =120
AAS = 120/60=2 正好等于OS load 2。
如果有3个session都100%仅消耗CPU,那么总有一个要wait on queue
DB CPU =2* 60mins ,wait on CPU queue=60mins
AAS= (120+ 60)/60=3 主机load 亦为3,此时vmstat 看waiting for run time

1-1 内存参数大小

Cache Sizes


BeginEnd

Buffer Cache:2,880M2,880MStd Block Size:8K
Shared Pool Size:4,782M4,796MLog Buffer:4,356K

1-2 Load Profile

Load Profile


Per SecondPer TransactionPer ExecPer Call
DB Time(s):1.10.00.000.00
DB CPU(s):1.10.00.000.00
Redo size (bytes):35,814.6140.3

Logical read (blocks):22,708.388.9

Block changes:230.30.9

Physical read (blocks):395.71.6

Physical write (blocks):4.60.0

Read IO requests:8.70.0

Write IO requests:2.30.0

Read IO (MB):3.10.0

Write IO (MB):0.00.0

User calls:2,795.211.0

Parses (SQL):635.82.5

Hard parses (SQL):20.90.1

SQL Work Area (MB):2.70.0

Logons:0.10.0

Executes (SQL):641.82.5

Rollbacks:252.31.0

Transactions:255.3


指标含义
redo size单位bytes,redosize可以用来估量update/insert/delete的频率,大的redo size往往对lgwr写日志,和arch归档造成I/O压力,

 
Per Transaction可以用来分辨是大量小事务,还是少量大事务。如上例每秒redo 约1MB,每个事务800 字节,符合OLTP特征


Logical Read 单位(次数*块数),逻辑读耗CPU,主频和CPU核数都很重要,逻辑读高则DB CPU往往高,也往往可以看到latch: cache buffer chains等待。


Block changes 单位(次数*块数),描绘数据变化频率


Physical Read 单位(次数*块数),物理读消耗IO读,体现在IOPS和吞吐量等不同纬度上;但减少物理读可能意味着消耗更多CPU。


好的存储 每秒物理读能力达到几GB,例如Exadata。这个physical read包含了physical reads cache和physical reads direct


Physical writes 单位(次数*块数),主要是DBWR写datafile,也有direct path write。

dbwr长期写出慢会导致定期log file switch(checkpoint no complete) 检查点无法完成的前台等待。

 这个physical write 包含了physical writes direct +physical writes from cacheUser Calls 单位次数,用户调用数,more details from internalParses 解析次数,包括软解析+硬解析,软解析优化得不好,则夸张地说几乎等于每秒SQL执行次数。即执行解析比1:1,而我们希望的是解析一次到处运行


Hard Parses 万恶之源:Cursor pin s on X, library cache: mutex X , latch: row cache objects /shared pool……………..。硬解析最好少于每秒20次


W/A MB processed 单位MB W/A workarea workarea中处理的数据数量,结合 In-memory Sort%Logons 登陆次数, 结合AUDIT审计数据一起看。

Executes 执行次数,反应执行频率Rollback 回滚次数,反应回滚频率,但是这个指标不太精确,

Transactions 每秒事务数,是数据库层的TPS,可以看做压力测试或比对性能时的一个指标,孤立看无意义% Blocks changed per Read 每次逻辑读导致数据块变化的比率;

如果’redo size’, ‘block changes’ ‘pct of blocks changed per read’三个指标都很高,则说明系统正执行大量insert/update/delete;pct of blocks changed per read = (block changes ) /( logical reads)
Recursive Call % 递归调用的比率;Recursive Call% = (recursive calls)/(user calls)
Rollback per transaction % 事务回滚比率。Rollback per transaction %= (rollback)/(transactions)
Rows per Sort平均每次排序涉及到的行数;Rows per Sort=(sorts(rows) ) / ( sorts(disk) + sorts(memory))

注意这些Load Profile负载指标在本环节提供了2个维度per second和per transaction。

per Second: 主要是把快照内的时间值除以快照时间的秒数,例如在A快照中V$SYSSTAT视图反应 table scans (long tables) 这个指标是 100 ,


在B快照中V$SYSSTAT视图反应 table scans (long tables) 这个指标是 3700, 而A快照和B快照之间间隔了一个小时3600秒,则对于table scans (long tables) per second 就是 ( 3700- 100) /3600=1。

per transaction : 基于事务的维度,与per second相比是把除数从时间的秒数改为了该段时间内的事务数。这个维度的很大用户是用来识别应用特性的变化 

若2个AWR性能报告中该维度指标 出现了大幅变化,例如 redo size从本来per transaction 1k变化为 10k per transaction,则说明SQL业务逻辑肯定发生了某些变化。

注意AWR中的这些指标 并不仅仅用来孤立地了解 Oracle数据库负载情况, 实施调优工作。对于 故障诊断 例如HANG、Crash等, 完全可以通过对比问题时段的性能报告和常规时间来对比,通过各项指标的对比往往可以找出 病灶所在。


1-3 Instance Efficiency Percentages (Target 100%

Instance Efficiency Percentages (Target 100%)

Buffer Nowait %:100.00Redo NoWait %:100.00
Buffer Hit %:100.00In-memory Sort %:100.00
Library Hit %:90.16Soft Parse %:96.72
Execute to Parse %:0.93Latch Hit %:99.94
Parse CPU to Parse Elapsd %:75.79% Non-Parse CPU:87.28

上述所有指标的目标均为100%,越大越好
80%以上 %Non-Parse CPU
90%以上 Buffer Hit%, In-memory Sort%, Soft Parse%
95%以上 Library Hit%, Redo Nowait%, Buffer Nowait%
98%以上 Latch Hit%

1、Buffer Nowait % session申请一个buffer(兼容模式)不等待的次数比例。需要访问buffer时立即可以访问的比率, 

2、buffer HIT%: 高速缓存命中率,反应物理读和缓存命中间的纠结,但这个指标即便99% 也不能说明物理读等待少了

不合理的db_cache_size,或者是SGA自动管理ASMM /Memory自动管理AMM下都可能因为db_cache_size过小引起大量的db file sequential /scattered read等待事件; 


此外与 buffer HIT%相关的指标值得关注的还有 table scans(long tables) 大表扫描这个统计项目、此外相关的栏目还有Buffer Pool Statistics 、Buffer Pool Advisory等

3、Redo nowait%: session在生成redo entry时不用等待的比例,redo相关的资源争用例如redo space request争用可能造成生成redo时需求等待。此项数据来源于v$sysstat中的(redo log space requests/redo entries)。

一般来说10g以后不太用关注log_buffer参数的大小,需要关注是否有十分频繁的 log switch ;过小的redo logfile size 如果配合较大的SGA和频繁的commit提交都可能造成该问题。

考虑增到redo logfile 的尺寸 : 1-2G 每个,10-15组都是合适的。同时考虑优化redo logfile和datafile 的I/O。

4、In-memory Sort%:这个指标因为它不计算workarea中所有的操作类型,纯粹在内存中完成的排序比例。

5、Library Hit%: library cache命中率,申请一个library cache object例如一个SQL cursor时,其已经在library cache中的比例。合理值:>95% ,ns

6、Soft Parse: 软解析比例,经典指标,合理值>95%
Soft Parse %是AWR中另一个重要的解析指标,该指标反应了快照时间内软解析次数和总解析次数 (soft+hard 软解析次数+硬解析次数)的比值,若该指标很低,那么说明了可能存在剧烈的hard parse硬解析,大量的硬解析会消耗更多的CPU时间片并产生解析争用(此时可以考虑使用cursor_sharing=FORCE);


理论上我们总是希望 Soft Parse % 接近于100%, 但并不是说100%的软解析就是最理想的解析状态,通过设置 session_cached_cursors参数和反复重用游标我们可以让解析来的更轻量级,即通俗所说的利用会话缓存游标实现的软软解析(soft soft parse)。

7、Execute to Parse%指标反映了执行解析比其公式为 1-(parse/execute) , 目标为100% 及接近于只执行而不解析。

在oracle中解析往往是执行的先提工作,但是通过游标共享可以解析一次执行多次,执行解析可能分成多种场景:
hard coding => 代码硬解析一次,执行一次,理论上其执行解析比为 1:1 ,则理论上Execute to Parse =0 极差,且soft parse比例也为0%


绑定变量但是仍软解析=》软解析一次,执行一次 ,这种情况虽然比前一种好 但是执行解析比(这里的parse,包含了软解析和硬解析)仍是1:1, 理论上Execute to Parse =0 极差,但是soft parse比例可能很高


使用静态SQL、动态绑定、session_cached_cursor、open cursors等技术实现的解析一次,执行多次,执行解析比为N:1,则Execute to Parse= 1- (1/N) 执行次数越多Execute to Parse越接近100%,这种是我们在OLTP环境中希望看到的。


通俗地说 soft parse% 反映了软解析率, 而软解析在oracle中仍是较昂贵的操作, 我们希望的是解析1次执行N次,如果每次执行均需要软解析,那么虽然soft parse%=100% 但是parse time仍可能是消耗DB TIME的大头。


Execute to Parse反映了执行解析比,Execute to Parse和soft parse% 都很低那么说明确实没有绑定变量,而如果 soft parse%接近99%而Execute to Parse 不足90% 则说明没有执行解析比低,需要通过静态SQL、动态绑定、session_cached_cursor、open cursors等技术减少软解析。

8、Latch Hit%: willing-to-wait latch闩申请不要等待的比例。

9、Parse CPU To Parse Elapsd:该指标反映了快照内解析CPU时间和总的解析时间的比值(Parse CPU Time/ Parse Elapsed Time);若该指标水平很低,那么说明在整个解析过程中 实际在CPU上运算的时间是很短的,而主要的解析时间都耗费在各种其他非空闲的等待事件上了(如latch:shared pool,row cache lock之类等)

10、%Non-Parse CPU非解析cpu比例,公式为 (DB CPU – Parse CPU)/DB CPU,


1-5 Top 10 Foreground Events by Total Wait Time

Top 10 Foreground Events by Total Wait Time

EventWaitsTotal Wait Time (sec)Wait Avg(ms)% DB timeWait Class
DB CPU
3823.1
98.4
log file sync10,933101.592.6Commit
cursor: pin S3,29923.47.6Concurrency
SQL*Net message to client7,835,07613.30.3Network
latch: shared pool7739.913.3Concurrency
direct path read29,4394.20.1User I/O
library cache: mutex X6813.15.1Concurrency
cursor: pin S wait on X732.636.1Concurrency
latch: row cache objects5442.34.1Concurrency
SQL*Net more data to client122,90020.1Network

丰富的等待事件以足够的细节来描绘系统运行的性能瓶颈(Mysql梦寐以求的)


Waits : 该等待事件发生的次数

Times : 该等待事件消耗的总计时间,单位为秒,对于DB CPU而言是前台进程所消耗CPU时间片的总和Avg

Wait(ms) :该等待事件平均等待的时间,实际就是Times/Waits,单位ms,

Wait Class: 等待类型:
Concurrency,SystemI/O,UserI/O,Administrative,Other,Configuration,Scheduler,Cluster,Application,Idle,Network,Commit

常见的等待事件=========================>

1、db file scattered read:Avg wait time应当小于20ms如果数据库执行全表扫描或者是全索引扫描会执行 Multi block I/O ,此时等待物理I/O 结束会出现此等待事件。一般从应用程序(SQL),I/O 方面入手调整; 注意和index fast full scans (full) 以及 table scans结合起来一起看。

2、db file sequential read:该等待事件Avg wait time平均单次等待时间应当小于20msdb file sequential read单块读等待是一种最为常见的物理IO等待事件,这里的sequential指的是将数据块读入到相连的内存空间中,而不是指所读取的数据块是连续的。

3、latch free:其实是未获得latch 而进入latch sleep

4、enq:XX 队列锁等待:视乎不同的队列锁有不同的情况:

Oracle队列锁: Enqueue HW 

enq: TX – row lock/index contention等待事件

enq: TT – contention等待事件 

enq: JI – contention等待事件 

enq: US – contention等待事件

enq: TM – contention等待事件

enq: RO fast object reuse等待事件 

enq: HW – contention等待事件

5、free buffer waits:是由于无法找到可用的buffer cache 空闲区域,需要等待DBWR 写入完成引起
一般是由于低效的sql、过小的buffer cache、DBWR 工作负荷过量引起,

6、buffer busy wait/ read by other session:以上2个等待事件可以归为一起处理

7、write complete waits :此类等待事件是由于DBWR 将脏数据写入数据文件,其他进程如果需要修改 buffer cache会引起此等待事件,一般是 I/O 性能问题或者是DBWR 工作负荷过量引起


8、control file parallel write:频繁的更新控制文件会造成大量此类等待事件,如日志频繁切换,检查点经常发生,nologging 引起频繁的数据文件更改,I/O 系统性能缓慢。

9、log file sync:此类等待时间是由于 LGWR 进程讲redo log buffer 写入redo log 中发生。如果此类事件频繁发生,可以判断为:commit 次数是否过多、I/O 系统问题、重做日志是否不必要被创建、redo log buffer是否过大


2-1 Time Model Statistics

Time Model Statistics

  • Total time in database user-calls (DB Time): 3886.1s
  • Statistics including the word “background” measure background process time, and so do not contribute to the DB time statistic
  • Ordered by % or DB time desc, Statistic name
Statistic NameTime (s)% of DB Time
DB CPU3,823.0998.38
sql execute elapsed time1,382.6135.58
parse time elapsed698.9817.99
hard parse elapsed time340.298.76
PL/SQL execution elapsed time8.170.21
connection management call elapsed time1.190.03
hard parse (sharing criteria) elapsed time0.560.01
PL/SQL compilation elapsed time0.540.01
failed parse elapsed time0.380.01
sequence load elapsed time0.170.00
repeated bind elapsed time0.020.00
DB time3,886.11
background elapsed time248.93
background cpu time48.61

Time Model Statistics几个特别有用的时间指标:

parse time elapsed、hard parse elapsed time 结合起来看解析是否是主要矛盾,若是则重点是软解析还是硬解析

sequence load elapsed time sequence序列争用是否是问题焦点

PL/SQL compilation elapsed time PL/SQL对象编译的耗时

注意PL/SQL execution elapsed time 纯耗费在PL/SQL解释器上的时间。不包括花在执行和解析其包含SQL上的时间

connection management call elapsed time 建立数据库session连接和断开的耗时

failed parse elapsed time 解析失败,例如由于ORA-4031

hard parse(sharing criteria)elapsed time由于无法共享游标造成的硬解析

hard parse(bind mismatch)elapsed time由于bind type or bind size 不一致造成的硬解析


注意该时间模型中的指标存在包含关系所以Time Model Statistics加起来超过100%再正常不过1) background elapsed time
2) background cpu time
3) RMAN cpu time (backup/restore)
1) DB time
2) DB CPU
2) connection management call elapsed time
2) sequence load elapsed time
2) sql execute elapsed time
2) parse time elapsed
3) hard parse elapsed time
4) hard parse (sharing criteria) elapsed time
5) hard parse (bind mismatch) elapsed time
3) failed parse elapsed time
4) failed parse (out of shared memory) elapsed time
2) PL/SQL execution elapsed time
2) inbound PL/SQL rpc elapsed time
2) PL/SQL compilation elapsed time
2) Java execution elapsed time
2) repeated bind elapsed time
2-2 Foreground Wait Class

Foreground Wait Class

  • s – second, ms – millisecond – 1000th of a second
  • ordered by wait time desc, waits desc
  • %Timeouts: value of 0 indicates value was < .5%. Value of null is truly 0
  • Captured Time accounts for 102.7% of Total DB time 3,886.11 (s)
  • Total FG Wait Time: 166.02 (s) DB CPU time: 3,823.09 (s)
Wait ClassWaits%Time -outsTotal Wait Time (s)Avg wait (ms)%DB time
DB CPU

3,823
98.38
Commit10,933010292.61
Concurrency5,47904181.07
Network7,965,50201500.40
User I/O31,5040600.14
Application3390250.04
Other5771110.02
Configuration2100060.00
System I/O120000.00

常见的WAIT_CLASS类型
—————————————
Concurrency
User I/O
System I/O
Administrative
Other
Configuration
Scheduler
Cluster
Application
Queueing
Idle
Network
Commit


Wait Class: 等待事件的类型。

Waits: 该类型所属等待事件在快照时间内的等待次数

%Time Out 等待超时的比率,未超时次数/waits * 100 (%)

Total Wait Time: 该类型所属等待事件总的耗时,单位为秒

Avg Wait(ms) : 该类型所属等待事件的平均单次等待时间,单位为ms ,实际这个指标对commit 和 user i/o 以及system i/o类型有点意义

Other 类型,遇到该类型等待事件的话常见的原因是Oracle Bug或者网络、I/O存在问题,建议提交MOS

Concurrency 类型并行争用类型的等待事件,典型的如 latch: shared pool、latch: library cache、row cache lock、library cache pin/lockCluster 类型 为Real Application

Cluster RAC环境中的等待事件, 需要注意的是如果启用了RAC option,那么即使你的集群中只启动了一个实例,那么该实例也可能遇到 Cluster类型的等待事件, 例如gc buffer busy

System I/O 主要是后台进程维护数据库所产生的I/O,例如control file parallel write 、log file parallel write、db file parallel write。

User I/O 主要是前台进程做了一些I/O操作,并不是说后台进程不会有这些等待事件。典型的如db file sequential/scattered read、direct path read

Configuration 由于配置引起的等待事件,例如日志切换的log file switch 

Application 应用造成的等待事件,例如enq: TM – contention和enq: TX – row lock

contention;Oracle认为这是由于应用设计不当造成的等待事件, 但实际这些Application class 等待可能受到 Concurrency、Cluster、System I/O 、User I/O等多种类型等待的影响,例如本来commit只要1ms ,则某一行数据仅被锁定1ms,但由于commit变慢从而释放行锁变慢,引发大量的enq: TX – row lock contention等待事件。

Network : 网络类型的等待事件 例如 SQL*Net more data to client 、SQL*Net more data to dblink

Idle 空闲等待事件 ,最为常见的是rdbms ipc message 

SQL*Net message from client 等待SQL*NET传来信息


2-3 Foreground Wait Events

Foreground Wait Events

  • s – second, ms – millisecond – 1000th of a second
  • Only events with Total Wait Time (s) >= .001 are shown
  • ordered by wait time desc, waits desc (idle events last)
  • %Timeouts: value of 0 indicates value was < .5%. Value of null is truly 0
EventWaits%Time -outsTotal Wait Time (s)Avg wait (ms)Waits /txn% DB time
log file sync10,933010290.012.61
cursor: pin S3,29902370.000.60
SQL*Net message to client7,835,07601308.500.34
latch: shared pool773010130.000.26
direct path read29,4390400.030.11
library cache: mutex X6810350.000.08
cursor: pin S wait on X7303360.000.07
latch: row cache objects5440240.000.06
SQL*Net more data to client122,9000200.130.05
enq: KO – fast object checkpoint2301480.000.03
db file sequential read1,6080110.000.03
latch free5450010.000.01
direct path sync1500180.000.01
kksfbc child completion41000510.000.01
enq: TX – row lock contention800250.000.01
SQL*Net break/reset to client3060010.000.01
SQL*Net more data from client7,5260000.010.00
local write wait70040.000.00
Disk file operations I/O1770000.000.00
enq: RO – fast object reuse200110.000.00
latch: cache buffers chains530000.000.00
reliable message160010.000.00
undo segment extension2100060.000.00
cursor: mutex S100110.000.00
buffer busy waits240000.000.00
read by other session20030.000.00
direct path write2430000.000.00
db file parallel read10030.000.00
latch: session allocation100000.000.00
latch: In memory undo latch120000.000.00
library cache lock20010.000.00
library cache load lock60000.000.00
latch: enqueue hash chains10010.000.00
SQL*Net message from client7,835,0810261,357338.50
jobq slave wait7,4961003,7635020.01

2-4 Background Wait Events

Background Wait Events

  • ordered by wait time desc, waits desc (idle events last)
  • Only events with Total Wait Time (s) >= .001 are shown
  • %Timeouts: value of 0 indicates value was < .5%. Value of null is truly 0
EventWaits%Time -outsTotal Wait Time (s)Avg wait (ms)Waits /txn% bg time
log file parallel write11,570010490.0141.67
db file async I/O submit2,497075300.0030.27
control file parallel write1,576017110.006.77
os thread startup13908600.003.35
db file sequential read1750020.000.13
latch: shared pool1700160.000.11
control file sequential read4,1680000.000.06
direct path sync1001040.000.04
log file sync200280.000.02
ADR block file read160020.000.01
ADR block file write50030.000.01
reliable message230000.000.00
asynch descriptor resize245100000.000.00
Disk file operations I/O660000.000.00
LGWR wait for redo copy320000.000.00
direct path write230000.000.00
rdbms ipc message30,2976261,07120160.03
DIAG idle wait7,1921007,21410030.01
smon timer15733,7552503340.00
shared server idle wait1211003,631300100.00
Streams AQ: qmn coordinator idle wait266483,613135830.00
Streams AQ: qmn slave idle wait12903,613280080.00
pmon timer1,2011003,60930050.00
Space Manager: slave idle wait7221003,60849970.00
dispatcher timer601003,601600120.00
SQL*Net message from client5320010.00
class slave wait190000.00

2-5 Operating System Statistics

Operating System Statistics

  • *TIME statistic values are diffed. All others display actual values. End Value is displayed if different
  • ordered by statistic type (CPU Use, Virtual Memory, Hardware Config), Name
StatisticValueEnd Value
BUSY_TIME389,214
IDLE_TIME5,201,491
IOWAIT_TIME11,255
NICE_TIME0
SYS_TIME155,118
USER_TIME227,910
LOAD01
RSRC_MGR_CPU_WAIT_TIME0
VM_IN_BYTES0
VM_OUT_BYTES0
PHYSICAL_MEMORY_BYTES33,805,135,872
NUM_CPUS16
NUM_CPU_CORES16
NUM_CPU_SOCKETS4
GLOBAL_RECEIVE_SIZE_MAX4,194,304
GLOBAL_SEND_SIZE_MAX1,048,576
TCP_RECEIVE_SIZE_DEFAULT87,380
TCP_RECEIVE_SIZE_MAX4,194,304
TCP_RECEIVE_SIZE_MIN4,096
TCP_SEND_SIZE_DEFAULT16,384
TCP_SEND_SIZE_MAX4,194,304
TCP_SEND_SIZE_MIN4,096

Operating System Statistics 操作系统统计信息, TIME相关的指标单位均为百分之一秒

NUM_CPU_SOCKETS:物理CPU的数目

NUM_CPU_CORES:CPU的核数


NUM_CPUS:逻辑CPU的数目


SYS_TIME:在内核态被消耗掉的CPU时间片,单位为百分之一秒


USER_TIME:在用户态被消耗掉的CPU时间片,单位为百分之一秒


BUSY_TIME:Busy_Time=SYS_TIME+USER_TIME 消耗的CPU时间片,单位为百分之一秒


AVG_BUSY_TIME:AVG_BUSY_TIME= BUSY_TIME/NUM_CPUS


IDLE_TIME 空闲的CPU时间片,单位为百分之一秒


OS_CPU_WAIT_TIME:进程等OS调度的时间


IOWAIT_TIME:所有CPU花费在等待I/O完成上的时间 单位为百分之一秒

2-6 Service Statistcs

Service Statistics

  • ordered by DB Time
Service NameDB Time (s)DB CPU (s)Physical Reads (K)Logical Reads (K)
SYS$USERS3,8863,8231,42881,868
SYS$BACKGROUND00063
cufsoa0000
cufsoaXDB0000

Service Name 对应的服务名 (v$services), 

SYS$BACKGROUND代表后台进程, 

SYS$USERS一般是系统用户登录


DB TIME (s): 本服务名所消耗的DB TIME时间,单位为秒

DB CPU(s): 本服务名所消耗的DB CPU 时间,单位为秒

Physical Reads : 本服务名所消耗的物理读Logical Reads : 本服务所消耗的逻辑读


2-7 Service Wait Class Stats

Service Wait Class Stats

  • Wait Class info for services in the Service Statistics section.
  • Total Waits and Time Waited displayed for the following wait classes: User I/O, Concurrency, Administrative, Network
  • Time Waited (Wt Time) in seconds
Service NameUser I/O Total WtsUser I/O Wt TimeConcurcy Total WtsConcurcy Wt TimeAdmin Total WtsAdmin Wt TimeNetwork Total WtsNetwork Wt Time
SYS$USERS31504654794100796551215
SYS$BACKGROUND264014880000
cufsoa00000000

User I/O Total Wts : 对应该服务名下用户I/O类等待的总的次数

User I/O Wt Time :对应该服务名下用户I/O累等待的总时间,单位为 1/100秒

Concurcy Total Wts: 对应该服务名下 Concurrency 类型等待的总次数

Concurcy Wt Time :对应该服务名下 Concurrency 类型等待的总时间, 单位为 1/100秒

Admin Total Wts: 对应该服务名下Admin 类等待的总次数

Admin Wt Time: 对应该服务名下Admin类等待的总时间,单位为1/100秒

Network Total Wts : 对应服务名下Network类等待的总次数

Network Wt Time:对应服务名下Network类等待的总事件,单位为1/100秒

2-8 Host CPU

Host CPU

CPUsCoresSocketsLoad Average BeginLoad Average End%User%System%WIO%Idle
161640.480.624.12.80.293.0

Load Average begin/end值代表每个CPU的大致运行队列大小。


2-8 Instance CPU

Instance CPU

%Total CPU%Busy CPU%DB time waiting for CPU (Resource Manager)
6.999.50.0

%Busy CPU,该实例所使用的Cpu占总的被使用CPU的比例 % of busy CPU for Instance

例如共4个逻辑CPU,其中3个被完全使用,3个中的1个完全被该实例使用,则%Total CPU= ¼ =25%,而%Busy CPU= 1/3= 33%


当CPU高时一般看%Busy CPU可以确定CPU到底是否是本实例消耗的,还是主机上其他程序3 TOP SQL3-1 SQL ordered by Elapsed Time ,

SQL ordered by Elapsed Time

  • Resources reported for PL/SQL code includes the resources used by all SQL statements called by the code.
  • % Total DB Time is the Elapsed Time of the SQL statement divided into the Total Database Time multiplied by 100
  • %Total – Elapsed Time as a percentage of Total DB time
  • %CPU – CPU Time as a percentage of Elapsed Time
  • %IO – User I/O Time as a percentage of Elapsed Time
  • Captured SQL account for 13.9% of Total DB Time (s): 3,886
  • Captured PL/SQL account for 0.1% of Total DB Time (s): 3,886
Elapsed Time (s)ExecutionsElapsed Time per Exec (s)%Total%CPU%IOSQL IdSQL ModuleSQL Text
192.02916,6820.004.9446.610.007gwxpwru0czqw

27.05590.460.7098.600.004nwgd6fbmbkm0

注意对于PL/SQL,SQL Statistics不仅会体现该PL/SQL的执行情况,还会包括该PL/SQL包含的SQL语句的情况。


对于Top SQL很有必要一探究竟Elapsed Time (s): 该SQL累计运行所消耗的时间,Executions : 该SQL在快照时间内总计运行的次数 ;注意对于在快照时间内还没有执行完的SQL不计为一次,所以如果看到executions=0而又是TOP SQL,则很有可能是因为该SQL运行较旧还没执行完,需要特别关注一下。

Elapsed Time per Exec (s):平均每次执行该SQL耗费的时间,对于OLTP类型的SELECT/INSERT/UPDATE/DELETE而言平均单次执行时间应当非常短,
如0.1秒 或者更短才能满足其业务需求,如果这类轻微的OLTP操作单次也要几秒钟的话,是无法满足对外业务的需求的;

如果这些操作也变得很慢,则会出现大量事务阻塞,系统负载升高,DB TIME急剧上升的现象。对于OLTP数据库而言 如果执行计划稳定,那么这些OLTP操作的性能应当是稳定的,但是一旦某个因素 发生变化,例如存储的明显变慢、内存换页的大量出现时则上述的这些transaction操作很可能成数倍到几十倍的变慢,这将让此事务系统短期内不可用。

%Total 该SQL所消耗的时间占总的DB Time的百分比, 即 (SQL Elapsed Time / Total DB TIME)

% CPU 该SQL 所消耗的CPU时间占该SQL消耗的时间里的比例,

%IO 该SQL 所消耗的I/O时间占该SQL消耗的时间里的比例,该指标说明了该语句是否是I/O敏感的SQL Id : 通过计算SQL 文本获得的SQL_ID ,不同的SQL文本必然有不同的SQL_ID, 对于10g~11g而言 只要SQL文本不变那么在数据库之间 该SQL 对应的SQL_ID应当不不变的, 12c中修改了SQL_ID的计算方法


3-2 SQL ordered by CPU Time

SQL ordered by CPU Time

  • Resources reported for PL/SQL code includes the resources used by all SQL statements called by the code.
  • %Total – CPU Time as a percentage of Total DB CPU
  • %CPU – CPU Time as a percentage of Elapsed Time
  • %IO – User I/O Time as a percentage of Elapsed Time
  • Captured SQL account for 10.1% of Total CPU Time (s): 3,823
  • Captured PL/SQL account for 0.0% of Total CPU Time (s): 3,823
CPU Time (s)ExecutionsCPU per Exec (s)%TotalElapsed Time (s)%CPU%IOSQL IdSQL ModuleSQL Text
89.51916,6820.002.34192.0246.610.007gwxpwru0czqw

26.67590.450.7027.0598.600.004nwgd6fbmbkm0

CPU TIME : 该SQL在快照时间内累计执行所消耗的CPU时间片,单位为s


Executions : 该SQL在快照时间内累计执行的次数

CPU per Exec (s) :该SQL 平均单次执行所消耗的CPU时间,%Total : 该SQL累计消耗的CPU时间占该时段总的DB CPU的比例,

% CPU 该SQL 所消耗的CPU时间占该SQL消耗的时间里的比例,该指标说明了该语句是否是CPU敏感的

%IO 该SQL 所消耗的I/O时间占该SQL消耗的时间里的比例, 该指标说明了该语句是否是I/O敏感的


3-3 Buffer Gets SQL ordered by Gets

SQL ordered by Reads

  • %Total – Physical Reads as a percentage of Total Disk Reads
  • %CPU – CPU Time as a percentage of Elapsed Time
  • %IO – User I/O Time as a percentage of Elapsed Time
  • Total Disk Reads: 1,427,765
  • Captured SQL account for 0.0% of Total
Physical ReadsExecutionsReads per Exec%TotalElapsed Time (s)%CPU%IOSQL IdSQL ModuleSQL Text
03,2180.000.000.7837.010.00074w4jr8a9fu8

033,1800.000.007.5563.610.0009tx5h4ngu7va

注意 buffer gets 逻辑读是消耗CPU TIME的重要源泉, 但并不是说消耗CPU TIME的只有buffer gets。 


大多数情况下 SQL order by CPU TIME和SQL order by buffers gets 2个部分的TOP SQL 及其排列顺序都是一样的,此种情况说明消耗最多buffer gets的 就是消耗最多CPU 的SQL ,如果我们希望降低系统的CPU使用率,那么只需要调优SQL 降低buffer gets 即可。

但也并不是100%的情况都是如此,CPU TIME的消耗者还包括函数运算、PL/SQL 控制、Latch /Mutex 的Spin等等, 所以SQL order by CPU TIME 和 SQL order by buffers gets 2个部分的TOP SQL 完全不一样也是有可能的,

 Buffer Gets : 该SQL在快照时间内累计运行所消耗的buffer gets,包括了consistent read 和 current readExecutions : 该SQL在快照时间内累计执行的次数

Gets per Exec : 该SQL平均单次的buffer gets , 对于事务型transaction操作而言 一般该单次buffer gets小于2000% Total 该SQL累计运行所消耗的buffer gets占总的db buffer gets的比率,


3-4 Physical Reads SQL ordered by Reads

SQL ordered by Physical Reads (UnOptimized)

  • UnOptimized Read Reqs = Physical Read Reqts – Optimized Read Reqs
  • %Opt – Optimized Reads as percentage of SQL Read Requests
  • %Total – UnOptimized Read Reqs as a percentage of Total UnOptimized Read Reqs
  • Total Physical Read Requests: 31,234
  • Captured SQL account for 0.0% of Total
  • Total UnOptimized Read Requests: 31,234
  • Captured SQL account for 0.0% of Total
  • Total Optimized Read Requests: 1
  • Captured SQL account for 0.0% of Total
UnOptimized Read ReqsPhysical Read ReqsExecutionsUnOptimized Reqs per Exec%Opt%TotalSQL IdSQL ModuleSQL Text
1212112.000.000.04gjm43un5cy843

003,2180.00
0.00074w4jr8a9fu8

Physical reads : 该SQL累计运行所消耗的物理读


Executions : 该SQL在快照时间内累计执行的次数

Reads per Exec : 该SQL单次运行所消耗的物理读, 对于OLTP transaction 类型的操作而言单次一般不超过100%Total : 该SQL 累计消耗的物理读占该时段总的物理读的比例, 


3-5 Executions SQL ordered by Executions

SQL ordered by Executions

  • %CPU – CPU Time as a percentage of Elapsed Time
  • %IO – User I/O Time as a percentage of Elapsed Time
  • Total Executions: 2,315,874
  • Captured SQL account for 52.1% of Total
ExecutionsRows ProcessedRows per ExecElapsed Time (s)%CPU%IOSQL IdSQL ModuleSQL Text
916,682916,3161.00192.0246.607gwxpwru0czqw

51,29300.0015.9140.20fdywauggm8byz

按照执行次数来排序的话,也是性能报告对比时一个重要的参考因素,因为如果TOP SQL的执行次数有明显的增长,那么性能问题的出现也是意料之中的事情了。当然执行次数最多的,未必便是对性能影响最大的TOP SQL


Executions : 该SQL在快照时间内累计执行的次数Rows Processed:该SQL在快照时间内累计执行所处理的总行数


Rows per Exec:SQL平均单次执行所处理的行数,这个指标在诊断一些数据问题造成的SQL性能问题时很有用


3-6 Parse Calls SQL ordered by Parse Calls

SQL ordered by Parse Calls

  • Total Parse Calls: 2,294,317
  • Captured SQL account for 52.6% of Total
Parse CallsExecutions% Total ParsesSQL IdSQL ModuleSQL Text
916,829916,68239.967gwxpwru0czqw
select companyname from licens…
51,29351,2932.24fdywauggm8byz
select * from WorkFlowPlanSet …

Parse Calls : 解析调用次数,与上文的 Load Profile中的Parse数一样包括 软解析soft parse和硬解析hard parse


Executions : 该SQL在快照时间内累计执行的次数%Total Parses : 本SQL 解析调用次数占该时段数据库总解析次数的比率


3-7 SQL ordered by Sharable MemoryShareable Mem(b): SQL对象所占用的共享内存使用量Executions : 该SQL在快照时间内累计执行的次数%Total : 该SQL 对象锁占共享内存 占总的共享内存的比率


3-8 SQL ordered by Version Count

SQL ordered by Version Count

  • Only Statements with Version Count greater than 20 are displayed
Version CountExecutionsSQL IdSQL ModuleSQL Text
2216wm3n4d7bnddg
SELECT source, (case when tim…

Executions : 该SQL在快照时间内累计执行的次数
Hash Value : 共享SQL 的哈希值


4 Instance Activity Stats


4-1 Other by statistic name

Other Instance Activity Stats

  • Ordered by statistic name
StatisticTotalper Secondper Trans
Batched IO (bound) vector count00.000.00
Batched IO (full) vector count00.000.00
Batched IO (space) vector count00.000.00
Batched IO block miss count30.000.00
Batched IO buffer defrag count00.000.00
Batched IO double miss count10.000.00
Batched IO same unit count00.000.00
Batched IO single block count00.000.00
Batched IO slow jump count00.000.00
Batched IO vector block count30.000.00
Batched IO vector read count10.000.00
Block Cleanout Optim referenced60.000.00
CCursor + sql area evicted3210.090.00
CPU used by this session189,05152.390.21
CPU used when call started187,60151.990.20
CR blocks created2610.070.00
Cached Commit SCN referenced567,554157.290.62
Commit SCN cached740.020.00
DBWR checkpoint buffers written16,1854.490.02
DBWR checkpoints260.010.00
DBWR object drop buffers written60.000.00
DBWR revisited being-written buffer00.000.00
DBWR tablespace checkpoint buffers written1570.040.00
DBWR thread checkpoint buffers written00.000.00
DBWR transaction table writes1220.030.00
DBWR undo block writes6,5381.810.01
HSC Heap Segment Block Changes143,72539.830.16
HSC IDL Compressed Blocks00.000.00
Heap Segment Array Inserts2,8070.780.00
Heap Segment Array Updates4,6421.290.01
IMU CR rollbacks2180.060.00
IMU Flushes


这里每一个指标都代表一种数据库行为的活跃度,
虽然这些指标均只有Total、per Second每秒、 per Trans每事务 三个维度,但对诊断问题十分有用。例如:


1、 例如当 Top Event 中存在direct path read为Top 等待事件, 则需要分清楚是对普通堆表的direct read还是由于大量LOB读造成的direct path read, 这个问题可以借助 table scans (direct read)、table scans (long tables)、physical reads direct 、physical reads direct (lob) 、
physical reads direct temporary几个指标来分析,

假设 physical reads direct >> 远大于 physical reads direct (lob)+physical reads direct temporary , 且有较大的table scans (direct read)、table scans (long tables) (注意这2个指标代表的是 扫描表的次数 不同于上面的phsical reads 的单位为 块数*次数), 则说明了是 大表扫描引起的direct path read。

2、 例如当 Top Event中存在enq Tx:index contention等待事件, 则需要分析root node splits 、branch node splits 、leaf node 90-10 splits 、leaf node splits 、failed probes on index block rec 几个指标


4-2 Statistics with absolute values

Instance Activity Stats – Absolute Values

  • Statistics with absolute values (should not be diffed)
StatisticBegin ValueEnd Value
logons current8580
opened cursors current793275
session cursor cache count17,245,58417,263,174
session pga memory373,767,091,272373,863,965,728
session pga memory max429,564,886,056429,369,395,424
session uga memory283,783,601,784283,855,681,528
session uga memory max758,640,598,976759,257,627,368

Instance Activity Stats – Absolute Values是显示快照 起点 和终点的一些指标的绝对值
logon current :当前时间点的登录数opened cursors current :当前打开的游标数session cursor cache count :当前存在的session缓存游标数


5 IO 统计5-1 Tablespace IO Stats 基于表空间分组的IO信息

Tablespace IO Stats

  • ordered by IOs (Reads + Writes) desc
TablespaceReadsAv Rds/sAv Rd(ms)Av Blks/Rd1-bk Rds/sAv 1-bk Rd(ms)WritesWrites avg/sBuffer WaitsAv Buf Wt(ms)
USERS24,11770.0226.684,2675.180140.00
16,39120.00122.527140.0600191.05
127101.111.071,6730.071020.00
SYSAUX13801.741.009040.042000.00
UNDOTBS1000.000.006520.000042.50
SYSTEM29900.941.001220.081010.00
TEMP600.001.0010.000000.00

reads : 指 该表空间上发生的物理读的次数(单位不是块,而是次数)


Av Reads/s : 指该表空间上平均每秒的物理读次数 (单位不是块,而是次数)

Av Rd(ms): 指该表空间上每次读的平均读取延迟

Av Blks/Rd: 指该表空间上平均每次读取的块数目,因为一次物理读可以读多个数据块;如果Av Blks/Rd>>1则可能系统有较多db file scattered read 可能是诊断FULL TABLE SCAN或FAST FULL INDEX SCAN,需要关注table scans (long tables) 和index fast full scans (full) 2个指标

Writes : 该表空间上发生的物理写的次数 ; 对于那些Writes总是等于0的表空间 不妨了解下是否数据为只读,如果是可以通过read only tablespace来解决 RAC中的一些性能问题。

Av Writes/s : 指该表空间上平均每秒的物理写次数

buffer Waits: 该表空间上发生buffer busy waits和read by other session的次数( 9i中buffer busy waits包含了read by other session)。

Av Buf Wt(ms): 该表空间上发生buffer Waits的平均等待时间,单位为ms


5-2 File I/O

File IO Stats

  • ordered by Tablespace, File
TablespaceFilenameReadsAv Rds/sAv Rd(ms)Av Blks/Rd1-bk Rds/sAv 1-bk Rd(ms)WritesWrites avg/sBuffer WaitsAv Buf Wt(ms)
101.dbf6,39120.00122.5200.097140191.05
101.dbf27101.111.0701.091,673020.00
SYSAUX01.dbf13801.741.0001.74904000.00
SYSTEM01.dbf29900.941.0000.97122010.00
TEMP01.dbf600.001.0000.00100
UNDOTBS101.dbf00

0
652042.50
USERS01.dbf24,11770.0226.6850.024,267140.00

Tablespace 表空间名


FileName 数据文件的路径

Reads: 该数据文件上累计发生过的物理读次数,不是块数

Av Reads/s: 该数据文件上平均每秒发生过的物理读次数,不是块数

Av Rd(ms): 该数据文件上平均每次物理读取的延迟,单位为ms

Av Blks/Rd: 该数据文件上平均每次读取涉及到的块数,OLTP环境该值接近 1

Writes : 该数据文件上累计发生过的物理写次数,不是块数

Av Writes/s: 该数据文件上平均每秒发生过的物理写次数,不是块数

buffer Waits: 该数据文件上发生buffer busy waits和read by other session的次数

Av Buf Wt(ms): 该数据文件上发生buffer Waits的平均等待时间,单位为ms若某个表空间上有较高的IO负载,则有必要分析一下是否其所属的数据文件上的IO 较为均匀还是存在倾斜, 是否需要结合存储特征来将数据均衡分布到不同磁盘上的数据文件上,以优化 I/O


6 缓冲池统计 Buffer Pool Statistics

Buffer Pool Statistics

  • Standard block size Pools D: default, K: keep, R: recycle
  • Default Pools for other block sizes: 2k, 4k, 8k, 16k, 32k
PNumber of BuffersPool Hit%Buffer GetsPhysical ReadsPhysical WritesFree Buff WaitWrit Comp WaitBuffer Busy Waits
D354,60010080,349,2201,60316,2000030

P: pool池的名字 

D: 默认的缓冲池 default buffer pool ,

K : Keep Pool , 

R: Recycle Pool ; 

2k 4k 8k 16k 32k: 代表各种非标准块大小的缓冲池


Number of buffers: 实际的 缓冲块数目, 约等于池的大小/池的块大小

Pool Hit % : 该缓冲池的命中率

Buffer Gets: 对该缓冲池的中块的访问次数包括consistent gets 和db block gets

Physical Reads: 该缓冲池Buffer Cache引起了多少物理读,其实是physical reads cache ,单位为 块数*次数

Physical Writes :该缓冲池中Buffer cache被写的物理写,其实是physical writes from cache,单位为 块数*次数

Free Buffer Waits: 等待空闲缓冲的次数,可以看做该buffer pool 发生free buffer waits 等待的次数

Write Comp Wait: 等待DBWR写入脏buffer到磁盘的次数,可以看做该buffer pool发生write complete waits等待的次数

Buffer Busy Waits: 该缓冲池发生buffer busy wait 等待的次数


7-1 Checkpoint Activity 检查点

Checkpoint Activity

  • Total Physical Writes: 16,478
MTTR WritesLog Size WritesLog Ckpt WritesOther Settings WritesAutotune Ckpt WritesThread Ckpt Writes
000016,0280

Instance Recovery Stats 实例恢复

Instance Recovery Stats

  • B: Begin Snapshot, E: End Snapshot

Targt MTTR (s)Estd MTTR (s)Recovery Estd IOsActual RedoBlksTarget RedoBlksLog Sz RedoBlksLog Ckpt Timeout RedoBlksLog Ckpt Interval RedoBlksOpt Log Sz(M)Estd RAC Avail Time
B0231056446139600339738339600


E02315051658874323339738374323


MTTR Writes : 为了满足FAST_START_MTTR_TARGET指定的MTTR值而做出的物理写 WRITES_MTTR

Log Size Writes :由于最小的redo log file而做出的物理写

WRITES_LOGFILE_SIZELog Ckpt

writes:由于 LOG_CHECKPOINT_INTERVAL 和 LOG_CHECKPOINT_TIMEOUT 驱动的增量检查点而做出的物理写

WRITES_LOG_CHECKPOINT_SETTINGS

Other Settings Writes :由于其他设置(例如FAST_START_IO_TARGET)而引起的物理写, WRITES_OTHER_SETTINGS

Autotune Ckpt Writes : 由于自动调优检查点而引起的物理写, WRITES_AUTOTUNE

Thread Ckpt Writes :由于thread checkpoint而引起的物理写,

WRITES_FULL_THREAD_CKPTB 代表 开始点, E 代表结尾Targt MTTR (s) : 目标MTTR (mean time to recover)意为有效恢复时间,单位为秒。

estimated_mttr (s): 当前基于脏buffer和重做日志块的数量,而评估出的有效恢复时间 。它的估算告诉用户以当下系统的负载若发生实例crash,则需要多久时间来做crash recovery的前滚操作,之后才能打开数据库。

Recovery Estd IOs :实际是当前buffer cache中的脏块数量,一旦实例崩溃 这些脏块要被前滚

Actual RedoBlks :当前实际需要恢复的redo重做块数量

Target RedoBlks :是Log Sz RedoBlks、Log Ckpt Timeout RedoBlks、 Log Ckpt Interval RedoBlks 三者的最小值

Log Sz RedoBlks : 代表必须在log file switch日志切换之前完成的 checkpoint 中涉及到的redo block,也叫max log lag;

Log Ckpt Timeout RedoBlks :为了满足LOG_CHECKPOINT_TIMEOUT 所需要处理的redo block数,lag for checkpoint timeout ;

Log Ckpt Interval RedoBlks :为了满足LOG_CHECKPOINT_INTERVAL 所需要处理的redo block数, lag for checkpoint interval;

Opt Log Sz(M) : 基于FAST_START_MTTR_TARGET 而估算出来的redo logfile 的大小,单位为MB 。


7-2 Buffer Pool Advisory 缓冲池建议

Buffer Pool Advisory

  • Only rows with estimated physical reads >0 are displayed
  • ordered by Block Size, Buffers For Estimate
PSize for Est (M)Size FactorBuffers (thousands)Est Phys Read FactorEstimated Phys Reads (thousands)Est Phys Read TimeEst %DBtime for Rds
D2880.103596.402,217,6891466300.00
D5760.207131.73729,9991153419.00
D8640.3010613.10301,470163293.00
D1,1520.401427.56173,942136472.00
D1,4400.491774.62106,305122247.00
D1,7280.592133.2775,245115715.00
D2,0160.692482.5859,336112369.00
D2,3040.792842.0346,73819720.00
D2,5920.893191.4633,61016958.00
D2,8800.993551.0223,50414833.00
D2,9121.003591.0023,00614728.00
D3,1681.093900.7416,97513460.00
D3,4561.194260.6214,34412907.00
D3,7441.294610.5612,78112578.00
D4,0321.384960.5011,42012292.00
D4,3201.485320.4610,54112107.00
D4,6081.585670.439,96611986.00
D4,8961.686030.429,58711906.00
D5,1841.786380.419,32611851.00
D5,4721.886740.409,12411809.00
D5,7601.987090.388,77811736.00

缓冲池的颗粒大小


P 指缓冲池的名字可能包括有 

D default buffer pool , 

K Keep Pool ,

 R recycle Pool

Size For Est(M): 指以该尺寸的buffer pool作为评估的对象,一般是目前current size的 10% ~ 200%,以便了解 buffer pool增大 ~减小对物理读的影响

Size Factor : 尺寸因子,只对应buffer pool大小对当前设置的比例因子Buffers (thousands) :指这个buffer pool 尺寸下的buffer数量, 要乘以1000才是实际值

Est Phys Read Factor :评估的物理读因子,

Estimated Phys Reads (thousands):评估的物理读数目,要乘以1000才是实际值, 显然不同尺寸的buffer pool对应不同的评估的物理读数目

Est Phys Read Time :评估的物理读时间

Est %DBtime for Rds:评估的物理读占DB TIME的比率我们看buffer pool advisory 一般有2个目的:在物理读较多的情况下,希望通过增加buffer pool 大小来缓解物理读等待,这是我们关注Size Factor > 1的buffer pool尺寸是否能共有效减少Est Phys Read Factor, 如果Est Phys Read Factor随着Size Factor增大而显著减少,那么说明增大buffer cache 是可以有效减少物理读的。在内存紧张的情况下 ,希望从buffer pool中匀出部分内存来移作他用,但是又不希望 buffer cache变小导致物理读增多性能下降,则此时观察Est Phys Read Factor 是否随着Size Factor 减小而显著增大,如果不是 则说明减少部分buffer cache 不会导致 物理读大幅增加,也就可以安心减少buffer cache


7-3 PGA Aggr Summary

PGA Aggr Summary

  • PGA cache hit % – percentage of W/A (WorkArea) data processed only in-memory
PGA Cache Hit %W/A MB ProcessedExtra W/A MB Read/Written
100.009,6960

PGA Cache Hit % : 指W/A WorkArea工作区的数据仅在内存中处理的比率, PGA缓存命中率


W/A MB processes: 指在Workarea中处理过的数据的量,单位为MB

Extra W/A MB Read/Written : 指额外从磁盘上读写的工作区数据,单位为 MB


7-4 PGA Aggr Target StatsPGA Aggr Target Stats

No data exists for this section of the report.


PGA Aggr Target(M) :本质上就是pga_aggregate_target

Auto PGA Target(M) : 在自动PGA 管理模式下实际可用的工作区内存 “aggregate PGA auto target “, 

W/A PGA Used(M) :所有的工作区workarea(包括manual和 auto)使用的内存总和量, 单位为MB

%PGA W/A Mem: 分配给workarea的内存量占总的PGA的比例,

 %Auto W/A Mem : AUTO 自动工作区管理所控制的内存占总的workarea内存的比例

%Man W/A Mem : MANUAL 手动工作区管理所控制的内存占总的workarea内存的比例

Global Mem Bound(K) : 指 在自动PGA管理模式下一个工作区所能分配的最大内存(注意 一个SQL执行过程中可能有多个工作区workarea)。

Global Mem Bound(K)这个指标在实例运行过程中将被持续性的修正,以反应数据库当时工作区的负载情况。显然在有众多活跃工作区的系统负载下相应地Global Mem Bound将会下降。但应当保持global bound值不要小于1 MB , 否则建议 调高pga_aggregate_target


7-5 PGA Aggr Target Histogram

PGA Aggr Target Histogram

  • Optimal Executions are purely in-memory operations
Low OptimalHigh OptimalTotal ExecsOptimal Execs1-Pass ExecsM-Pass Execs
2K4K96,63396,63300
64K128K50450400
128K256K888800
256K512K707000
512K1024K4,6164,61600
1M2M2,9152,91500
2M4M64364300
4M8M6600
8M16M9900
16M32M6600
32M64M2200

Low Optimal:此行所包含工作区workarea最适合内存要求的下限


High Optimal:此行所包含工作区workarea最适合内存要求的上限

Total Execs: 在 Low Optimal~High Optimal 范围工作区内完成的总执行数

Optimal execs: optimal执行是指完全在PGA内存中完成的执行次数

1-pass Execs : 指操作过程中仅发生1次磁盘读取的执行次数

M-pass Execs: 指操作过程中发生了1次以上的磁盘读取,频发磁盘读取的执行次数


7-6 PGA Memory AdvisoryPGA Memory Advisory

  • When using Auto Memory Mgmt, minimally choose a pga_aggregate_target value where Estd PGA Overalloc Count is 0
PGA Target Est (MB)Size FactrW/A MB ProcessedEstd Extra W/A MB Read/ Written to DiskEstd PGA Cache Hit %Estd PGA Overalloc CountEstd Time
5640.138,289,305.45287,052.2997.00454,922,528,131
1,1280.258,289,305.4584,121.7699.0004,806,053,130
2,2560.508,289,305.4583,858.2099.0004,805,901,855
3,3840.758,289,305.4583,858.2099.0004,805,901,855
4,5121.008,289,305.4560,642.9199.0004,792,577,099
5,4141.208,289,305.4560,521.4399.0004,792,507,373
6,3171.408,289,305.4560,521.4399.0004,792,507,373
7,2191.608,289,305.4560,521.4399.0004,792,507,373
8,1221.808,289,305.4560,521.4399.0004,792,507,373
9,0242.008,289,305.4560,521.4399.0004,792,507,373
13,5363.008,289,305.4560,521.4399.0004,792,507,373
18,0484.008,289,305.4560,521.4399.0004,792,507,373
27,0726.008,289,305.4560,521.4399.0004,792,507,373
36,0968.008,289,305.4560,521.4399.0004,792,507,373

PGA Target Est (MB) 用以评估的 PGA_AGGREGATE _TARGET值


Size Factr , 当前用以评估的PGA_AGGREGATE _TARGET和当前实际设置的PGA_AGGREGATE_TARGET之间的比例因子PGA Target Est / PGA_AGGREGATE_TARGE

W/A MB Processed :workarea中要处理的数据量, 单位为MB

Estd Extra W/A MB Read/ Written to Disk : 以 one-pass 、M-Pass方式处理的数据量预估值, 单位为MB

Estd P Cache Hit % : 预估的PGA缓存命中率

Estd PGA Overalloc Count: 预估的PGA过载量,所述PGA_AGGREGATE _TARGET仅是一个目标值,无法真正限制PGA内存的使用,当出现 PGA内存硬性需求时会产生PGA overallocate 过载(When using Auto Memory Mgmt, minimally choose a pga_aggregate_target value where Estd PGA Overalloc Count is 0)


7-7 Shared Pool Advisory

Shared Pool Advisory

  • SP: Shared Pool Est LC: Estimated Library Cache Factr: Factor
  • Note there is often a 1:Many correlation between a single logical object in the Library Cache, and the physical number of memory objects associated with it. Therefore comparing the number of Lib Cache objects (e.g. in v$librarycache), with the number of Lib Cache Memory Objects is invalid.
Shared Pool Size(M)SP Size FactrEst LC Size (M)Est LC Mem ObjEst LC Time Saved (s)Est LC Time Saved FactrEst LC Load Time (s)Est LC Load Time FactrEst LC Mem Obj Hits (K)
3,0400.6041660,1953,762,8980.445,169,73917.62974,023
3,5520.7092786,8575,146,6650.603,785,97212.901,140,581
4,0640.801,438115,5176,393,8500.742,538,7878.651,276,670
4,5760.901,949138,5577,580,6690.881,351,9684.611,402,383
4,7680.942,141147,5228,009,6510.93922,9863.151,447,003
4,8000.942,173149,2808,079,4770.94853,1602.911,454,012
4,8320.952,205150,6038,149,1150.94783,5222.671,460,993
4,8640.962,237152,4408,219,1950.95713,4422.431,468,076
4,8960.962,269153,6868,287,5150.96645,1222.201,474,824
4,9280.972,301155,5118,355,8210.97576,8161.971,481,547
4,9600.972,333157,3088,424,1140.98508,5231.731,488,291
4,9920.982,365158,8598,492,4270.98440,2101.501,495,136
5,0240.992,397160,2498,559,7730.99372,8641.271,502,818
5,0560.992,429161,6358,600,3001.00332,3371.131,507,575
5,0881.002,461163,0848,639,2101.00293,4271.001,512,485
5,1201.012,493165,1518,641,3181.00291,3190.991,513,085
5,1521.012,523167,1068,641,4021.00291,2350.991,513,123
5,1841.022,555168,9908,641,4991.00291,1380.991,513,163
5,2161.032,587170,4848,641,6001.00291,0370.991,513,203
5,2481.032,619172,2208,641,7021.00290,9350.991,513,237
5,2801.042,651173,8668,641,7791.00290,8580.991,513,268
5,3121.042,683175,5608,641,8521.00290,7850.991,513,300
5,3441.052,715177,1958,641,9321.00290,7050.991,513,332
5,3761.062,747178,9188,642,0061.00290,6310.991,513,363
5,6001.102,971192,3448,642,5231.00290,1140.991,513,598
6,1121.203,483219,8478,643,6331.00289,0040.981,514,118
6,6241.303,995248,7218,644,5481.00288,0890.981,514,525
7,1361.404,507274,9558,645,4251.00287,2120.981,514,932
7,6481.505,019295,1158,646,2631.00286,3740.981,515,331
8,1601.605,530323,7208,647,0491.00285,5880.971,515,713
8,6721.706,041364,0018,647,7971.00284,8400.971,516,028
9,1841.816,552387,8648,648,5131.00284,1240.971,516,322
9,6961.917,063415,2968,649,1841.00283,4530.971,516,607
10,2082.017,575443,2108,649,8181.00282,8190.961,516,874

Shared Pool Size(M) : 用以评估的shared pool共享池大小,在AMM /ASMM环境下 shared_pool 大小都可能浮动


SP Size Factr :共享池大小的比例因子,(Shared Pool Size for Estim / SHARED_POOL_SIZE)

Estd LC Size(M) : 评估的 library cache大小,单位为MB,因为是shared pool中包含 library cache 当然还有其他例如row cache


7-8 SGA Target Advisory

SGA Target Advisory

SGA Target Size (M)SGA Size FactorEst DB Time (s)Est Physical Reads
4,1920.505,510,5253,005,545,869
5,2400.633,074,4023,005,545,869
6,2880.751,609,103408,575,030
7,3360.881,558,43180,417,920
8,3841.001,549,59823,006,128
9,4321.131,547,42923,006,128
10,4801.251,545,56917,321,314
11,5281.381,543,86417,321,314
12,5761.501,542,31517,321,314
13,6241.631,540,92017,321,314
14,6721.751,539,83614,284,505
15,7201.881,539,52612,365,794
16,7682.001,539,52611,896,469

SGA target Size : 用以评估的sga target大小 (sga_target)


SGA Size Factor: SGA Size的比例因子,

Est DB Time (s): 评估对应于该指定sga target size会产生多少量的DB TIME,单位为秒

Est Physical Reads:评估对应该指定的sga target size 会产生多少的物理读


7-9 Streams Pool Advisory

Streams Pool Advisory

Size for Est (MB)Size FactorEst Spill CountEst Spill Time (s)Est Unspill CountEst Unspill Time (s)
320.500000
641.000000
961.500000
1282.000000
1602.500000
1923.000000
2243.500000
2564.000000
2884.500000
3205.000000
3525.500000
3846.000000
4166.500000
4487.000000
4807.500000
5128.000000
5448.500000
5769.000000
6089.500000
64010.000000

Size for Est (MB) : 用以评估的 streams pool大小


Size Factor :streams pool大小的比例因子

Est Spill Count :评估出的当使用该大小的流池时 message溢出到磁盘的数量 ESTD_SPILL_COUNT

Est Spill Time (s):评估出的当使用该大小的流池时 message溢出到磁盘的耗时,单位为秒 ESTD_SPILL_TIME

Est Unspill Count:评估的当使用该大小的流池时 message unspill 即从磁盘上读取的数量 ESTD_UNSPILL_COUNT

Est Unspill Time (s) :评估的 当使用该大小的流池时 message unspill 即从磁盘上读取的耗时,单位为秒 ESTD_UNSPILL_TIME


8 Wait Statistics8-1 Buffer Wait Statistics

Buffer Wait Statistics

  • ordered by wait time desc, waits desc
ClassWaitsTotal Wait Time (s)Avg Time (ms)
data block2601
undo header403

该环节是对 缓冲池中各类型(class) 块 等待的汇总信息,wait的原因一般是 buffer busy waits 和 read by other session
class 数据块的class, 一个oracle数据块即有class 属性 还有type 属性,数据块中记录type属性(KCBH), 而在buffer header里存有class属性(X$BH.class)

Waits: 该类型数据块的等待次数

Total Wait Time (s) : 该类型数据块的合计等待时间 单位为秒

Avg Time (ms) : 该类型数据块 平均每次等待的耗时, 单位 ms对于INSERT ON INDEX 引起的争用:
使用反向索引key
使用HASH分区和本地索引
可能的情况下 减少index的density


8-2 Enqueue Activity

Enqueue Activity

  • only enqueues with waits are shown
  • Enqueue stats gathered prior to 10g should not be compared with 10g data
  • ordered by Wait Time desc, Waits desc
Enqueue Type (Request Reason)RequestsSucc GetsFailed GetsWaitsWt Time (s)Av Wt Time(ms)
KO-Multiple Object Checkpoint (fast object checkpoint)230230023148.70
TX-Transaction (row lock contention)8808025.00
RO-Multiple Object Reuse (fast object reuse)303002010.00

Enqueue Type (Request Reason) enqueue 队列的类型,enqueue type是队列锁所要保护的资源如TM 表锁CF 控制文件锁,enqueue mode 是持有队列锁的模式 (SS、SX 、S、SSX、X)Requests : 申请对应的enqueue type资源或者队列转换(enqueue conversion 例如 S 转 SSX ) 的次数Succ Gets :对应的enqueue被成功 申请或转换的次数


Failed Gets :对应的enqueue的申请 或者转换失败的次数
Waits :由对应的enqueue的申请或者转换而造成等待的次数
Wt Time (s) :由对应的enqueue的申请或者转换而造成等待的等待时间
Av Wt Time(ms) :由对应的enqueue的申请或者转换而造成等待的平均等待时间 , Wt Time (s) / Waits ,单位为m主要的enqueue 等待事件:
enq: TX – row lock/index contention、allocate ITL等待事件
enq: TM – contention等待事件8-3 Undo Segment Summary

Undo Segment Summary

  • Min/Max TR (mins) – Min and Max Tuned Retention (minutes)
  • STO – Snapshot Too Old count, OOS – Out of Space count
  • Undo segment block stats:
  • uS – unexpired Stolen, uR – unexpired Released, uU – unexpired reUsed
  • eS – expired Stolen, eR – expired Released, eU – expired reUsed
Undo TS#Num Undo Blocks (K)Number of TransactionsMax Qry Len (s)Max Tx ConcurcyMin/Max TR (mins)STO/ OOSuS/uR/uU/ eS/eR/eU
26.4914,017905416/26.10/00/0/0/0/0/0

Undo Extent有三种状态 active 、unexpired 、expired

active => extent中 包括了活动的事务 ,active的undo extent 一般不允许被其他事务重用覆盖Max Qry Len (s) 该时段内 持续最久的查询 时间, 单位为秒Max Tx Concy 该时段内 最大的事务并发量
10-1 Latch Activity

Latch Activity

  • “Get Requests”, “Pct Get Miss” and “Avg Slps/Miss” are statistics for willing-to-wait latch get requests
  • “NoWait Requests”, “Pct NoWait Miss” are for no-wait latch get requests
  • “Pct Misses” for both should be very close to 0.0
Latch NameGet RequestsPct Get MissAvg Slps /MissWait Time (s)NoWait RequestsPct NoWait Miss
AQ deq hash table latch10.00
00
ASM db client latch2,4580.00
00
ASM map operation hash table10.00
00
ASM network state latch570.00
00
AWR Alerted Metric Element list28,6440.00
00
Change Notification Hash table latch1,2020.00
00
Consistent RBA11,5720.00
00
DML lock allocation40,8140.00
00
Event Group Locks5590.00
00
FAL Queue1440.00
00
FOB s.o list latch6170.160.0000
File State Object Pool Parent Latch10.00
00
I/O Staticstics latch10.00
00
IPC stats buffer allocation latch10.00
00
In memory undo latch73,6200.020.67016,1390.00
JS Sh mem access70.00
00
JS mem alloc latch40.00
00
JS queue access latch50.00
00
JS queue state obj latch26,1340.00
00

latch name Latch:闩的名字
Get Requests latch被以willing-to-wait模式申请并获得的次数

Pct Get Miss miss是指latch被以willing-to-wait 模式申请但是申请者必须等待的次数, Pct Get Miss = Miss/Get Requests ; miss可以从后面的Latch Sleep Breakdown 获得

Avg Slps /Miss Sleep 是指latch被以willing-to-wait模式申请最终导致session需要sleep以等待该latch的次数 ; Avg Slps /Miss = Sleeps/ Misses ; Sleeps可以从后面的Latch Sleep Breakdown 获得


Wait Time (s) 指花费在等待latch上的时间,单位为秒NoWait Requests 指latch被以no-wait模式来申请的次数Pct NoWait Miss 以no-wait模式来申请latch但直接失败的次数对于高并发的latch例如cache buffers chains,其Pct Misses应当十分接近于0


一般的调优原则:
如果latch : cache buffers chains是 Top 5 事件,则需要考虑优化SQL减少 全表扫描 并减少Top buffer gets SQL语句的逻辑读


如果latch : redo copy 、redo allocation 等待较多,则可以考虑增大LOG_BUFFER如果latch:library cache 发生较多,则考虑增大shared_pool_size


10-2 Latch Sleep Breakdown

Latch Sleep Breakdown

  • ordered by misses desc
Latch NameGet RequestsMissesSleepsSpin Gets
row cache objects23,008,10368,04855167,505
cache buffers chains160,393,75148,3786048,326
session idle bit23,321,9797,7975427,263
shared pool4,190,9655,8118785,031
session allocation3,152,31435010340
redo allocation67,10322220
mostly latch-free SCN11,86121417
In memory undo latch73,62018126
simulator hash latch4,671,49418414
shared pool simulator276,28514311
enqueue hash chains297,3951019
call allocation2,328312
simulator lru latch7,463321

latch name Latch闩的名字
Get Requests latch被以willing-to-wait模式申请并获得的次数misses 是指latch被以willing-to-wait 模式申请但是申请者必须等待的次数


10-3 Latch Miss SourcesLatch Miss Sources

  • only latches with sleeps are shown
  • ordered by name, sleeps desc
Latch NameWhereNoWait MissesSleepsWaiter Sleeps
In memory undo latchktiFlush: child01111
In memory undo latchkticmt: child031
In memory undo latchktichg: child010
cache buffers chainskcbgtcr: fast path (cr pin)04511
cache buffers chainskcbrls_201850
cache buffers chainskcbchg1: mod cr pin0145
cache buffers chainskcbgtcr: kslbegin excl01311
cache buffers chainskcbgcur_2051
cache buffers chainskcbgcur_4011
cache buffers chainskcbgtcr_2010
call allocationksudlp: top call010
enqueue hash chainsksqrcl010
mostly latch-free SCNkcslcu3044
redo allocationkcrfw_redo_write: before write020
row cache objectskqreqd: reget03032
row cache objectskqrpre: find obj0127427
row cache objectskqrso09493
row cache objectskqreqd02428
session allocationksucri_int : SSO050
session allocationksuxds0510
session idle bitksupuc: set busy0396204
session idle bitksupuc: clear busy0133235
session idle bitksuxds059149
shared poolkghalo0566416
shared poolkghalp0188164
shared poolkghupr1090263
shared poolkgh_heap_sizes01612
shared poolkghasp0106
shared poolkghfre0712
shared poolkghfrunp: clatch: nowait020
shared poolkghfree_extents: scan015
shared poolkghfrunp: clatch: wait010
shared pool simulatorkglsim_upd_newhp032
simulator hash latchkcbsacc: lookup dba044
simulator lru latchkcbs_simulate: simulate set020

latch name Latch闩的名字
where : 指哪些代码路径内核函数持有过这些该latch ,而不是哪些代码路径要申请这些latch;例如kcbgtcr函数的作用是Get a block for Consistent read,其持有latch :cache buffers chain是很正常的事情

NoWait Misses: 以no-wait模式来申请latch但直接失败的次数

Sleeps: 指latch被以willing-to-wait模式申请最终导致session需要sleep以等待该latch的次数 time of sleeps resulted in making the latch request

Waiter Sleeps:等待者休眠的次数 times of sleeps that waiters did for each where; Sleep 是阻塞者等待的次数 , Waiter Sleeps是被阻塞者等待的次数


10-4 Mutex Sleep Summary

Mutex Sleep Summary

  • ordered by number of sleeps desc
Mutex TypeLocationSleepsWait Time (ms)
Cursor Pinkksfbc [KKSCHLPIN1]4,5260
Cursor PinkksLockDelete [KKSCHLPIN6]2,9960
Cursor Pinkkslce [KKSCHLPIN2]2,1160
Library Cachekglhdgn2 1062850
Library Cachekglget2 21720
Library Cachekglget1 11640
Library Cachekgllkdl1 851050
Library Cachekglhdgh1 64650
Library Cachekglhdgn1 62620
Library Cachekglpndl1 95570
Library Cachekgldtin1 42480
Library Cachekglrfcl1 79460
Library Cachekglpin1 4370
Library Cachekgllkc1 57260
Library Cachekglobpn1 71250
Library Cachekglpnal1 90150
hash tablekkscsSearchChildList [KKSHBKLOC2]30
Library Cachekglllal3 11110

11 segment statistics 
11-1 Segments by Logical Reads

Segments by Logical Reads

  • Total Logical Reads: 81,939,646
  • Captured Segments account for 92.6% of Total
OwnerTablespace NameObject NameSubobject NameObj. TypeLogical Reads%Total
OUSERS

TABLE41,127,23250.19
O1

TABLE2,717,7603.32
O1

TABLE2,600,6243.17
OUSERS

TABLE2,581,1523.15
O1

TABLE2,211,7922.70

owner : 数据段的所有者
Tablespace Name: 数据段所在表空间名

Object Name : 对象名

Subobject Name:子对象名,例如一个分区表的某个分区

obj Type: 对象类型 一般为TABLE /INDEX 或者分区或子分区

Logical Reads :该数据段上发生过的逻辑读 , 单位为 块数*次数

%Total : 占总的逻辑读的百分比,当前对象上发生过的逻辑读/Total DB逻辑读


11-2 Segments by Physical Reads

Segments by Physical Reads

  • Total Physical Reads: 1,427,765
  • Captured Segments account for 99.2% of Total
OwnerTablespace NameObject NameSubobject NameObj. TypePhysical Reads%Total
O


TABLE783,32454.86
OUSERS

TABLE624,40243.73
OUSERS$$
LOB8,3160.58
O


TABLE1450.01
OUSERS

TABLE1280.01

Physical Reads: 该数据段上发生过的物理读,单位为块数*次数%Total : 占总的物理读的百分比 ,(当前对象上发生过的逻辑读/Total DB 逻辑读)


11-3 Segments by Physical Read Requests

Segments by Physical Read Requests

  • Total Physical Read Requests: 31,234
  • Captured Segments account for 64.2% of Total
OwnerTablespace NameObject NameSubobject NameObj. TypePhys Read Requests%Total
OUSERS$$
LOB8,19526.24
O


TABLE6,18019.79
OUSERS

TABLE5,24216.78
O


TABLE1450.46
OUSERS

TABLE1280.41

Phys Read Requests :物理读的申请次数
%Total :(该段上发生的物理读的申请次数/ physical read IO requests)
12 Dictionary Cache Stats

Dictionary Cache Stats

  • “Pct Misses” should be very low (< 2% in most cases)
  • “Final Usage” is the number of cache entries being used
CacheGet RequestsPct MissScan ReqsPct MissMod ReqsFinal Usage
dc_awr_control650.000
21
dc_files6100.000
06
dc_global_oids4354.140
0308
dc_histogram_data3,518,7090.050
06,216
dc_histogram_defs1,307,7980.280
17,437
dc_object_grants387.890
026
dc_objects1,750,3260.060
482,177
dc_profiles2820.000
01
dc_rollback_segments8860.000
022
dc_segments546,3720.060
26,319
dc_sequences33913.570
33939
dc_tablespaces1,316,8000.000
07
dc_users1,569,6290.000
0125
global database name2,5910.000
01
outstanding_alerts300.000
05
sch_lj_oids425.000
01

Get Requests 申请获取该数据字典缓存对象的次数 gets
Miss : GETMISSES 申请获取该数据字典缓存对象但 miss的次数

Pct Miss : GETMISSES /Gets , Miss的比例 ,这个pct miss应当非常低 小于2%,否则有出现大量row cache lock的可能

Scan Reqs:扫描申请的次数 ,Pct Miss:SCANMISSES/SCANS


13 Library Cache Activity

Library Cache Activity

  • “Pct Misses” should be very low
NamespaceGet RequestsPct MissPin RequestsPct MissReloadsInvali- dations
ACCOUNT_STATUS3180.310
00
BODY1,5781.083,4440.6420
CLUSTER1791.121791.1200
DBLINK3200.630
00
EDITION1890.003630.0000
INDEX424.764233.33120
OBJECT ID1100.000
00
QUEUE630.002150.0000
SCHEMA6390.160
00
SQL AREA317,16420.792,489,8448.747,1793,253
SQL AREA BUILD75,12096.340
00
SQL AREA STATS74,46195.3174,46195.3100
SUBSCRIPTION70.0070.0000
TABLE/PROCEDURE96,2080.35374,8620.581,0680
TRIGGER2,0273.7511,0881.25610

NameSpace library cache 的命名空间
GETS Requests 该命名空间所包含对象的library cache lock被申请的次数


14 SGA信息14 -1 SGA Memory Summary

SGA Memory Summary

SGA regionsBegin Size (Bytes)End Size (Bytes) (if different)
Database Buffers3,019,898,880
Fixed Size2,265,984
Redo Buffers4,460,544
Variable Size10,435,431,552

14-2 SGA breakdown difference

SGA breakdown difference

  • ordered by Pool, Name
  • N/A value for Begin MB or End MB indicates the size of that Pool/Name was insignificant, or zero in that snapshot
PoolNameBegin MBEnd MB% Diff
javafree memory128.00128.000.00
largePX msg pool7.817.810.00
largefree memory152.19152.190.00
sharedKGLDA68.1271.254.59
sharedKGLH01,322.651,374.363.91
sharedKGLHD201.44206.362.44
sharedSQLA1,710.041,874.219.60
sharedfree memory1,291.591,080.89-16.31
sharedkglsim heap69.3569.350.00
sharedkglsim object batch119.14119.140.00
streamsfree memory63.9463.940.00

buffer_cache2,880.002,880.000.00

fixed_sga2.162.160.00

log_buffer4.254.250.00

Pool 内存池的名字Name 内存池中细分组件的名字 例如KGLH0 存放KEL Heap 0 、SQLA存放SQL执行计划等Begin MB 快照开始时该组件的内存大小
End MB 快照结束时该组件的内存大小
% Diff 差异百分比以上

更多内容请关注微信公众号:数据与人

为您推荐

发表评论

您的电子邮箱地址不会被公开。