ITPub博客

首页 > Linux操作系统 > Linux操作系统 > statspack中相关性能指标的计算方法

statspack中相关性能指标的计算方法

原创 Linux操作系统 作者:lsq_008 时间:2009-02-26 21:13:47 0 删除 编辑
 

Buffer Cache Hit Ratio

100*( 1 -  ( valdiff( stats$sysstat, 'physical reads' )
- valdiff( stats$sysstat, 'physical reads direct' )
- valdiff( stats$sysstat, 'physical reads direct (lob)' )
) / valdiff( stats$sysstat, 'session logical reads' )
);

Sorts in Memory

 100*( valdiff( stats$sysstat, 'sorts (memory)' )
/ ( valdiff( stats$sysstat, 'sorts (memory)' )
+ valdiff( stats$sysstat, 'sorts (disk)' )
)
)

Shared Pool Free

select bytes from stats$sgastat
where snap_id = endsnap
and pool = 'shared pool'
and name = 'free memory'

Shared Pool Reloads

100*( valdiff( stats$librarycache, reloads)
/ valdiff( stats$librarycache, pins)
)

Library Cache Get Hit Ratio

100*( valdiff( stats$librarycache, gethits)
/ valdiff( stats$librarycache, gets)
)

Library Cache Pin Hit Ratio

100*( valdiff( stats$librarycache, pinhits)
/ valdiff( stats$librarycache, pins)

Buffer Nowait Percentage

100*( 1 - ( valdiff( stats$waitstat, wait_count )
/ valdiff( stats$sysstat, 'session logical reads' )
)
)

Redo Nowait Percentage

100*( 1 - ( valdiff( stats$sysstat, 'redo log space requests' )
/ valdiff( stats$sysstat, 'redo entries' )
)
)

Non-Parse CPU

100*( 1 - ( valdiff( stats$sysstat, 'parse time cpu' )
/ valdiff( stats$sysstat, 'CPU used by this session' )
)
)

Soft Parse

100*(1 - ( valdiff( stats$sysstat, 'parse count (hard)' )
/ valdiff( stats$sysstat, 'parse count (total)' )
)
)

Execute to Parse

100*( 1 - ( valdiff( stats$sysstat, 'parse count (total)' )
/ valdiff( stats$sysstat, 'execute count' )
)
)

Parse CPU to Parse Elapsed

100*( valdiff( stats$sysstat, 'parse time cpu' )
/ valdiff( stats$sysstat, 'parse time elapsed' )
)

Willing to Wait Latch Gets

100*(1 - ( valdiff( stats$latch, misses )
/ valdiff( stats$latch, gets )
)
)

Immediate Latch Gets

100*(1 - ( valdiff( stats$latch, immediate_misses )
/ valdiff( stats$latch, immediate_gets )
)
)

Rollback Segment Contention

100*( valdiff( stats$rollstat, waits )
/ valdiff( stats$rollstat, gets )
)

Total Transactions over interval

valdiff( stats$sysstat, 'user rollbacks' )
+
valdiff( stats$sysstat, 'user commits' )

Transactions per Second

( valdiff( stats$sysstat, 'user rollbacks' )
+
valdiff( stats$sysstat, 'user commits' )
)
/
interval seconds

Average Open Cursors

stats$syssstat 'opened cursors current'
/ stats$syssstat 'logons current'

Rollbacks

valdiff( stats$sysstat, 'user rollbacks' )

Commits

valdiff( stats$sysstat, 'user commits' )
/ trancount

valdiff( stats$sysstat, 'user commits' )
/ interval seconds

Redo Size

valdiff( stats$sysstat, 'redo size' )
/ trancount

valdiff( stats$sysstat, 'redo size' )
/ interval seconds

Logical Reads

valdiff( stats$sysstat, 'session logical reads' )
/ trancount

valdiff( stats$sysstat, 'session logical reads' )
/ interval seconds

Block Changes

valdiff( stats$sysstat, 'db block changes' )
/ trancount

valdiff( stats$sysstat, 'db block changes' )
/ interval seconds

Physical Reads

valdiff( stats$sysstat, 'physical reads' ) * blocksize / 1024
/ trancount

valdiff( stats$sysstat, 'physical reads' ) * blocksize / 1024
/ interval seconds

Physical Writes

valdiff( stats$sysstat, 'physical writes' ) * blocksize / 1024
/ trancount

valdiff( stats$sysstat, 'physical writes' ) * blocksize / 1024
/ interval seconds

User Calls

valdiff( stats$sysstat, 'user calls' )
/ trancount

valdiff( stats$sysstat, 'user calls' )
/ interval seconds

Parse Count

valdiff( stats$sysstat, 'parse count (total)' )
/ trancount

valdiff( stats$sysstat, 'parse count (total)' )
/ interval seconds

Hard Parse Count

valdiff( stats$sysstat, 'parse count (hard)' )
/ trancount

valdiff( stats$sysstat, 'parse count (hard)' )
/ interval seconds

Sort Count

( 
valdiff( stats$sysstat, 'sorts (memory)' )
+
valdiff( stats$sysstat, 'sorts (disk)' )
)
/ trancount

(
valdiff( stats$sysstat, 'sorts (memory)' )
+
valdiff( stats$sysstat, 'sorts (disk)' )
)
/ interval seconds

Logons Count

valdiff( stats$sysstat, 'logons cumulative' )
/ trancount

valdiff( stats$sysstat, 'logons cumulative' )
/ interval seconds

Executes

valdiff( stats$sysstat, 'execute count' )
/ trancount

valdiff( stats$sysstat, 'execute count' )
/ interval seconds

Reloads per Second

valdiff( stats$librarycache, sum(reloads) )
/ trancount

valdiff( stats$librarycache, sum(reloads) )
/ interval seconds

Data Size

select sum(bytes) from sys.dba_data_files
+
select sum(bytes) from sys.dba_temp_files
-
select sum(bytes) from sys.dba_free_space

Free Space Size

select sum(bytes) from sys.dba_free_space

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10972173/viewspace-557967/,如需转载,请注明出处,否则将追究法律责任。

下一篇: 查看oracle版本
请登录后发表评论 登录
全部评论
十余年大型金融及电信系统数据库管理经验,曾服务于中国建设银行、中国移动。对oracle,mysql数据库有深入了解。 擅长python开发,独立开发了开源数据库自动化监控运维平台Power Monitor。

注册时间:2008-02-29

  • 博文量
    325
  • 访问量
    1241913